Uses of Class
org.assertj.core.api.ThrowableAssertAlternative
Packages that use ThrowableAssertAlternative
-
Uses of ThrowableAssertAlternative in org.assertj.core.api
Subclasses of ThrowableAssertAlternative in org.assertj.core.apiModifier and TypeClassDescriptionclassSoftThrowableAssertAlternative<ACTUAL extends Throwable>ThrowableAssertAlternativesubclass used in soft assertions.Methods in org.assertj.core.api that return ThrowableAssertAlternativeModifier 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 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 the given description.ThrowableAssertAlternative.withMessageContaining(String description, Object... parameters) Verifies that the message of the actualThrowablecontains 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 actualThrowablecontains all the given values.ThrowableAssertAlternative.withMessageEndingWith(String description) Verifies that the message of the actualThrowableends with the given description.ThrowableAssertAlternative.withMessageEndingWith(String description, Object... parameters) Verifies that the message of the actualThrowableends 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 actualThrowablematches with the given regular expression.ThrowableAssertAlternative.withMessageNotContaining(String content) Verifies that the message of the actualThrowabledoes not contain the given content or is null.ThrowableAssertAlternative.withMessageNotContainingAny(CharSequence... values) Verifies that the message of the actualThrowabledoes not contain any of the given values or isnull.ThrowableAssertAlternative.withMessageStartingWith(String description) Verifies that the message of the actualThrowablestarts with the given description.ThrowableAssertAlternative.withMessageStartingWith(String description, Object... parameters) Verifies that the message of the actualThrowablestarts with the given description, after being formatted using theString.format(java.lang.String, java.lang.Object...)method.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.ThrowableAssertAlternative.withStackTraceContaining(String description, Object... parameters) Verifies that the stack trace of the actualThrowablecontains 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 aThrowableAssertAlternativeto chain further assertions on the underlying throwable.WithThrowable.withThrowableThat()Returns aThrowableAssertAlternativeto chain assertions on the underlying throwable.