Package | Description |
---|---|
org.assertj.core.api |
Modifier and Type | Method and Description |
---|---|
ThrowableAssertAlternative<T> |
ThrowableTypeAssert.isThrownBy(ThrowableAssert.ThrowingCallable throwingCallable)
Assert that an exception of type T is thrown by the
throwingCallable
and allow to chain assertions on the thrown exception. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withCause(Throwable cause)
Verifies that the actual
Throwable has a cause similar to the given one, that is with same type and message
(it does not use equals method for comparison). |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withCauseExactlyInstanceOf(Class<? extends Throwable> type)
Verifies that the cause of the actual
Throwable is exactly an instance of the given type. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withCauseInstanceOf(Class<? extends Throwable> type)
Verifies that the cause of the actual
Throwable is an instance of the given type. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withMessage(String message)
Verifies that the message of the actual
Throwable is equal to the given one. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withMessage(String message,
Object... parameters)
Verifies that the message of the actual
Throwable is equal to the given one built using String.format(String, Object...) syntax. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withMessageContaining(String description)
Verifies that the message of the actual
Throwable contains with the given description. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withMessageEndingWith(String description)
Verifies that the message of the actual
Throwable ends with the given description. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withMessageMatching(String regex)
Verifies that the message of the actual
Throwable matches with the given regular expression. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withMessageStartingWith(String description)
Verifies that the message of the actual
Throwable starts with the given description. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withNoCause()
Verifies that the actual
Throwable does not have a cause. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withRootCauseExactlyInstanceOf(Class<? extends Throwable> type)
Verifies that the root cause of the actual
Throwable is exactly an instance of the given type. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withRootCauseInstanceOf(Class<? extends Throwable> type)
Verifies that the root cause of the actual
Throwable is an instance of the given type. |
ThrowableAssertAlternative<T> |
ThrowableAssertAlternative.withStackTraceContaining(String description)
Verifies that the stack trace of the actual
Throwable contains with the given description. |
Copyright © 2014–2017 AssertJ. All rights reserved.