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 thethrowingCallableand allow to chain assertions on the thrown exception.Verifies that the actualThrowablehas a cause similar to the given one, that is with same type and message (it does not useequalsmethod for comparison).ThrowableAssertAlternative.withCauseExactlyInstanceOf(Class<? extends Throwable> type) Verifies that the cause of the actualThrowableis exactly an instance of the given type.ThrowableAssertAlternative.withCauseInstanceOf(Class<? extends Throwable> type) Verifies that the cause of the actualThrowableis an instance of the given type.ThrowableAssertAlternative.withMessage(String message) Verifies that the message of the actualThrowableis equal to the given one.ThrowableAssertAlternative.withMessage(String message, Object... parameters) Verifies that the message of the actualThrowableis equal to the given one built usingString.format(String, Object...)syntax.ThrowableAssertAlternative.withMessageContaining(String description) Verifies that the message of the actualThrowablecontains with the given description.ThrowableAssertAlternative.withMessageEndingWith(String description) Verifies that the message of the actualThrowableends with the given description.ThrowableAssertAlternative.withMessageMatching(String regex) Verifies that the message of the actualThrowablematches with the given regular expression.ThrowableAssertAlternative.withMessageStartingWith(String description) Verifies that the message of the actualThrowablestarts with the given description.ThrowableAssertAlternative.withNoCause()Verifies that the actualThrowabledoes not have a cause.ThrowableAssertAlternative.withRootCauseExactlyInstanceOf(Class<? extends Throwable> type) Verifies that the root cause of the actualThrowableis exactly an instance of the given type.ThrowableAssertAlternative.withRootCauseInstanceOf(Class<? extends Throwable> type) Verifies that the root cause of the actualThrowableis an instance of the given type.ThrowableAssertAlternative.withStackTraceContaining(String description) Verifies that the stack trace of the actualThrowablecontains with the given description.