Uses of Class
org.assertj.core.api.ThrowableAssertAlternative
Packages that use ThrowableAssertAlternative
-
Uses of ThrowableAssertAlternative in org.assertj.core.api
Methods in org.assertj.core.api that return ThrowableAssertAlternativeModifier and TypeMethodDescriptionThrowableTypeAssert.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 with the given description.ThrowableAssertAlternative.withMessageEndingWith
(String description) Verifies that the message of the actualThrowable
ends with the given description.ThrowableAssertAlternative.withMessageMatching
(String regex) Verifies that the message of the actualThrowable
matches with the given regular expression.ThrowableAssertAlternative.withMessageStartingWith
(String description) Verifies that the message of the actualThrowable
starts with the given description.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.