| Package | Description |
|---|---|
| org.assertj.core.api |
| Modifier and Type | Class and Description |
|---|---|
class |
SoftThrowableAssertAlternative<ACTUAL extends Throwable>
ThrowableAssertAlternative subclass used in soft assertions. |
| Modifier and Type | Method and Description |
|---|---|
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.as(Description description) |
protected ThrowableAssertAlternative<T> |
ThrowableTypeAssert.buildThrowableTypeAssert(T throwable) |
protected ThrowableAssertAlternative<T> |
SoftThrowableTypeAssert.buildThrowableTypeAssert(T throwable) |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.describedAs(Description description)
Sets the description of the assertion that is going to be called after.
|
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.describedAs(String description,
Object... args)
Sets the description of the assertion that is going to be called after.
|
ThrowableAssertAlternative<?> |
ThrowableAssertAlternative.havingCause()
|
ThrowableAssertAlternative<?> |
ThrowableAssertAlternative.havingRootCause()
|
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<ACTUAL> |
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<ACTUAL> |
ThrowableAssertAlternative.withCauseExactlyInstanceOf(Class<? extends Throwable> type)
Verifies that the cause of the actual
Throwable is exactly an instance of the given type. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withCauseInstanceOf(Class<? extends Throwable> type)
Verifies that the cause of the actual
Throwable is an instance of the given type. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessage(String message)
Verifies that the message of the actual
Throwable is equal to the given one. |
ThrowableAssertAlternative<ACTUAL> |
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<ACTUAL> |
ThrowableAssertAlternative.withMessageContaining(String description)
Verifies that the message of the actual
Throwable contains the given description. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageContaining(String description,
Object... parameters)
Verifies that the message of the actual
Throwable contains the given description, after being formatted using
the String.format(java.lang.String, java.lang.Object...) method. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageContainingAll(CharSequence... values)
Verifies that the message of the actual
Throwable contains all the given values. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageEndingWith(String description)
Verifies that the message of the actual
Throwable ends with the given description. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageEndingWith(String description,
Object... parameters)
Verifies that the message of the actual
Throwable ends with the given description, after being formatted using
the String.format(java.lang.String, java.lang.Object...) method. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageMatching(String regex)
Verifies that the message of the actual
Throwable matches with the given regular expression. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageNotContaining(String content)
Verifies that the message of the actual
Throwable does not contain the given content or is null. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageNotContainingAny(CharSequence... values)
Verifies that the message of the actual
Throwable does not contain any of the given values or is null. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageStartingWith(String description)
Verifies that the message of the actual
Throwable starts with the given description. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withMessageStartingWith(String description,
Object... parameters)
Verifies that the message of the actual
Throwable starts with the given description, after being formatted using
the String.format(java.lang.String, java.lang.Object...) method. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withNoCause()
Verifies that the actual
Throwable does not have a cause. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withRootCauseExactlyInstanceOf(Class<? extends Throwable> type)
Verifies that the root cause of the actual
Throwable is exactly an instance of the given type. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withRootCauseInstanceOf(Class<? extends Throwable> type)
Verifies that the root cause of the actual
Throwable is an instance of the given type. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withStackTraceContaining(String description)
Verifies that the stack trace of the actual
Throwable contains with the given description. |
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.withStackTraceContaining(String description,
Object... parameters)
Verifies that the stack trace of the actual
Throwable contains with the given description, after being formatted using
the String.format(java.lang.String, java.lang.Object...) method. |
ThrowableAssertAlternative<?> |
WithThrowable.withThrowableOfType(Class<? extends Throwable> type)
Checks that the underlying throwable is of the given type and returns a
ThrowableAssertAlternative to chain
further assertions on the underlying throwable. |
Copyright © 2025. All rights reserved.