Uses of Class
org.assertj.core.api.ThrowableAssertAlternative
-
Uses of ThrowableAssertAlternative in org.assertj.core.api
Modifier and TypeClassDescriptionclass
SoftThrowableAssertAlternative<ACTUAL extends Throwable>
ThrowableAssertAlternative
subclass used in soft assertions.Modifier and TypeMethodDescriptionThrowableAssertAlternative.as
(Description description) protected ThrowableAssertAlternative<T>
SoftThrowableTypeAssert.buildThrowableTypeAssert
(T throwable) protected ThrowableAssertAlternative<T>
ThrowableTypeAssert.buildThrowableTypeAssert
(T throwable) ThrowableAssertAlternative.describedAs
(String description, Object... args) Sets the description of the assertion that is going to be called after.ThrowableAssertAlternative.describedAs
(Description description) Sets the description of the assertion that is going to be called after.ThrowableAssertAlternative.havingCause()
ThrowableAssertAlternative.havingRootCause()
ThrowableTypeAssert.isThrownBy
(ThrowableAssert.ThrowingCallable throwingCallable) Assert that an exception of type T is thrown by thethrowingCallable
and allow to chain assertions on the thrown exception.Verifies that the actualThrowable
has a cause similar to the given one, that is with same type and message (it does not useequals
method for comparison).ThrowableAssertAlternative.withCauseExactlyInstanceOf
(Class<? extends Throwable> type) Verifies that the cause of the actualThrowable
is exactly an instance of the given type.ThrowableAssertAlternative.withCauseInstanceOf
(Class<? extends Throwable> type) Verifies that the cause of the actualThrowable
is an instance of the given type.ThrowableAssertAlternative.withMessage
(String message) Verifies that the message of the actualThrowable
is equal to the given one.ThrowableAssertAlternative.withMessage
(String message, Object... parameters) Verifies that the message of the actualThrowable
is equal to the given one built usingString.format(String, Object...)
syntax.ThrowableAssertAlternative.withMessageContaining
(String description) Verifies that the message of the actualThrowable
contains the given description.ThrowableAssertAlternative.withMessageContaining
(String description, Object... parameters) Verifies that the message of the actualThrowable
contains the given description, after being formatted using theString.format(java.lang.String, java.lang.Object...)
method.ThrowableAssertAlternative.withMessageContainingAll
(CharSequence... values) Verifies that the message of the actualThrowable
contains all the given values.ThrowableAssertAlternative.withMessageEndingWith
(String description) Verifies that the message of the actualThrowable
ends with the given description.ThrowableAssertAlternative.withMessageEndingWith
(String description, Object... parameters) Verifies that the message of the actualThrowable
ends with the given description, after being formatted using theString.format(java.lang.String, java.lang.Object...)
method.ThrowableAssertAlternative.withMessageMatching
(String regex) Verifies that the message of the actualThrowable
matches with the given regular expression.ThrowableAssertAlternative.withMessageNotContaining
(String content) Verifies that the message of the actualThrowable
does not contain the given content or is null.ThrowableAssertAlternative.withMessageNotContainingAny
(CharSequence... values) Verifies that the message of the actualThrowable
does not contain any of the given values or isnull
.ThrowableAssertAlternative.withMessageStartingWith
(String description) Verifies that the message of the actualThrowable
starts with the given description.ThrowableAssertAlternative.withMessageStartingWith
(String description, Object... parameters) Verifies that the message of the actualThrowable
starts with the given description, after being formatted using theString.format(java.lang.String, java.lang.Object...)
method.ThrowableAssertAlternative.withNoCause()
Verifies that the actualThrowable
does not have a cause.ThrowableAssertAlternative.withRootCauseExactlyInstanceOf
(Class<? extends Throwable> type) Verifies that the root cause of the actualThrowable
is exactly an instance of the given type.ThrowableAssertAlternative.withRootCauseInstanceOf
(Class<? extends Throwable> type) Verifies that the root cause of the actualThrowable
is an instance of the given type.ThrowableAssertAlternative.withStackTraceContaining
(String description) Verifies that the stack trace of the actualThrowable
contains with the given description.ThrowableAssertAlternative.withStackTraceContaining
(String description, Object... parameters) Verifies that the stack trace of the actualThrowable
contains with the given description, after being formatted using theString.format(java.lang.String, java.lang.Object...)
method.WithThrowable.withThrowableOfType
(Class<? extends Throwable> type) Checks that the underlying throwable is of the given type and returns aThrowableAssertAlternative
to chain further assertions on the underlying throwable.WithThrowable.withThrowableThat()
Returns aThrowableAssertAlternative
to chain assertions on the underlying throwable.