Throwables.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Throwables |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public AbstractThrowableAssert | Returns: a new assertion objectReturns a new assertion object that uses the cause of the current Throwable as the actual Throwable under test. |
| public void | doesNotThrowAnyException()
Verifies that the |
| public final void | doesNotThrowAnyExceptionExcept(Class<? extends Throwable>...
types allowed to be thrown. ignoredExceptionTypes)Verifies that the |
| public AbstractThrowableAssert | |
| public AbstractThrowableAssert | |
| protected SELF | |
| public SELF | |
| public SELF | Returns: this assertion object.the expected cause type. type)Verifies that the cause of the actual |
| public SELF | Returns: this assertion object.the expected cause type. type)Verifies that the cause of the actual |
| public SELF | Returns: this assertion object.the expected cause expected)Verifies that the actual Example:
|
| public SELF | Returns: this assertion object.the expected message. message)Verifies that the message of the actual |
| public SELF | Returns: this assertion object.a format string representing the expected message message, Object... argument referenced by the format specifiers in the format string parameters)Verifies that the message of the actual (@code Throwable) is equal to the given one, after being formatted using
the |
| public SELF | Returns: this assertion object.the description expected to be contained in the actual description)Throwable's message.Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the description expected to be contained in the actual description, Object... Throwable's message.argument referenced by the format specifiers in the format string parameters)Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the Strings expected to be contained in the actual values)Throwable's message.Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the description expected to end the actual description)Throwable's message.Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the description expected to end the actual description, Object... Throwable's message.argument referenced by the format specifiers in the format string parameters)Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the regular expression expected to be found in the actual regex)Throwable's message.Verifies that a sequence of the message of the actual |
| public SELF | Returns: this assertion object.the regular expression of value expected to be matched the actual regex)Throwable's message.Verifies that the message of the |
| public SELF | Returns: this assertion object.the regular expression of value expected to be matched the actual regex)Throwable's message.Verifies that the message of the |
| public SELF | Returns: this assertion object.the content expected not to be contained in the actual content)Throwable's message.Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the contents expected to not be contained in the actual values)Throwable's message.Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the description expected to start the actual description)Throwable's message.Verifies that the message of the actual |
| public SELF | Returns: this assertion object.the description expected to start the actual description, Object... Throwable's message.argument referenced by the format specifiers in the format string parameters)Verifies that the message of the actual |
| public SELF | Returns: this assertion object.Verifies that the actual |
| public SELF | Returns: this assertion object.Verifies that the actual |
| public SELF | Returns: this assertion object.the expected root cause cause)Verifies that the actual |
| public SELF | Returns: this assertion object.the expected cause type. type)Verifies that the root cause of the actual |
| public SELF | Returns: this assertion object.the expected cause type. type)Verifies that the root cause of the actual |
| public SELF | Returns: this assertion object.the expected root cause message. message)Verifies that the message of the root cause of the actual |
| public SELF | Returns: this assertion object.the expected root cause message. message, Object... argument referenced by the format specifiers in the format string. parameters)Verifies that the message of the root cause of the actual |
| public SELF | Returns: this assertion object.the description expected to be contained in the actual description)Throwable's stack trace.Verifies that the stack trace of the actual |
| public SELF | Returns: this assertion object.the description expected to be contained in the actual description, Object... Throwable's stack trace.argument referenced by the format specifiers in the format string parameters)Verifies that the stack trace of the actual |
| public SELF | Returns: this assertion object.the expected suppressed exception suppressedException)Verifies that the actual |
| private boolean | |
| public AbstractStringAssert | Returns: the createdStringAssert on the throwable message.A shortcut for |
| public AbstractThrowableAssert | Returns: a new assertion objectReturns a new assertion object that uses the root cause of the current Throwable as the actual Throwable under test. |
| throwables | back to summary |
|---|---|
| pack-priv Throwables throwables
| |
| AbstractThrowableAssert | back to summary |
|---|---|
| protected AbstractThrowableAssert(ACTUAL actual, Class<?> selfType) | |
| cause | back to summary |
|---|---|
| public AbstractThrowableAssert Returns a new assertion object that uses the cause of the current Throwable as the actual Throwable under test. Examples:
| |
| doesNotThrowAnyException | back to summary |
|---|---|
| public void doesNotThrowAnyException() Verifies that the Example :
| |
| doesNotThrowAnyExceptionExcept | back to summary |
|---|---|
| public final void doesNotThrowAnyExceptionExcept(Class<? extends Throwable>... ignoredExceptionTypes) Verifies that the Example:
| |
| getCause | back to summary |
|---|---|
| public AbstractThrowableAssert Deprecated use Returns a new assertion object that uses the cause of the current Throwable as the actual Throwable under test. Examples:
| |
| getRootCause | back to summary |
|---|---|
| public AbstractThrowableAssert Deprecated use Returns a new assertion object that uses the root cause of the current Throwable as the actual Throwable under test. Examples:
| |
| hasBeenThrown | back to summary |
|---|---|
| protected SELF hasBeenThrown() | |
| hasCause | back to summary |
|---|---|
| public SELF hasCause(Throwable cause) Verifies that the actual Example:
| |
| hasCauseExactlyInstanceOf | back to summary |
|---|---|
| public SELF hasCauseExactlyInstanceOf(Class<? extends Throwable> type) Verifies that the cause of the actual Example:
| |
| hasCauseInstanceOf | back to summary |
|---|---|
| public SELF hasCauseInstanceOf(Class<? extends Throwable> type) Verifies that the cause of the actual Example:
| |
| hasCauseReference | back to summary |
|---|---|
| public SELF hasCauseReference(Throwable expected) Verifies that the actual Example:
| |
| hasMessage | back to summary |
|---|---|
| public SELF hasMessage(String message) Verifies that the message of the actual
| |
| hasMessage | back to summary |
|---|---|
| public SELF hasMessage(String message, Object... parameters) Verifies that the message of the actual (@code Throwable) is equal to the given one, after being formatted using
the Example:
| |
| hasMessageContaining | back to summary |
|---|---|
| public SELF hasMessageContaining(String description) Verifies that the message of the actual Examples:
| |
| hasMessageContaining | back to summary |
|---|---|
| public SELF hasMessageContaining(String description, Object... parameters) Verifies that the message of the actual Examples:
| |
| hasMessageContainingAll | back to summary |
|---|---|
| public SELF hasMessageContainingAll(CharSequence... values) Verifies that the message of the actual Examples:
| |
| hasMessageEndingWith | back to summary |
|---|---|
| public SELF hasMessageEndingWith(String description) Verifies that the message of the actual Examples:
| |
| hasMessageEndingWith | back to summary |
|---|---|
| public SELF hasMessageEndingWith(String description, Object... parameters) Verifies that the message of the actual Examples:
| |
| hasMessageFindingMatch | back to summary |
|---|---|
| public SELF hasMessageFindingMatch(String regex) Verifies that a sequence of the message of the actual Examples:
| |
| hasMessageMatching | back to summary |
|---|---|
| public SELF hasMessageMatching(String regex) Verifies that the message of the Examples:
| |
| hasMessageMatching | back to summary |
|---|---|
| public SELF hasMessageMatching(Pattern regex) Verifies that the message of the Examples:
| |
| hasMessageNotContaining | back to summary |
|---|---|
| public SELF hasMessageNotContaining(String content) Verifies that the message of the actual Examples:
| |
| hasMessageNotContainingAny | back to summary |
|---|---|
| public SELF hasMessageNotContainingAny(CharSequence... values) Verifies that the message of the actual Examples:
| |
| hasMessageStartingWith | back to summary |
|---|---|
| public SELF hasMessageStartingWith(String description) Verifies that the message of the actual Examples:
| |
| hasMessageStartingWith | back to summary |
|---|---|
| public SELF hasMessageStartingWith(String description, Object... parameters) Verifies that the message of the actual Examples:
| |
| hasNoCause | back to summary |
|---|---|
| public SELF hasNoCause() Verifies that the actual
| |
| hasNoSuppressedExceptions | back to summary |
|---|---|
| public SELF hasNoSuppressedExceptions() Verifies that the actual Example:
| |
| hasRootCause | back to summary |
|---|---|
| public SELF hasRootCause(Throwable cause) Verifies that the actual Example:
| |
| hasRootCauseExactlyInstanceOf | back to summary |
|---|---|
| public SELF hasRootCauseExactlyInstanceOf(Class<? extends Throwable> type) Verifies that the root cause of the actual Example:
| |
| hasRootCauseInstanceOf | back to summary |
|---|---|
| public SELF hasRootCauseInstanceOf(Class<? extends Throwable> type) Verifies that the root cause of the actual Example:
| |
| hasRootCauseMessage | back to summary |
|---|---|
| public SELF hasRootCauseMessage(String message) Verifies that the message of the root cause of the actual Example:
| |
| hasRootCauseMessage | back to summary |
|---|---|
| public SELF hasRootCauseMessage(String message, Object... parameters) Verifies that the message of the root cause of the actual Example:
| |
| hasStackTraceContaining | back to summary |
|---|---|
| public SELF hasStackTraceContaining(String description) Verifies that the stack trace of the actual Examples:
| |
| hasStackTraceContaining | back to summary |
|---|---|
| public SELF hasStackTraceContaining(String description, Object... parameters) Verifies that the stack trace of the actual Examples:
| |
| hasSuppressedException | back to summary |
|---|---|
| public SELF hasSuppressedException(Throwable suppressedException) Verifies that the actual Example:
| |
| isNotAnInstanceOfAny | back to summary |
|---|---|
| private boolean isNotAnInstanceOfAny(Class<? extends Throwable>[] exceptionTypes) | |
| message | back to summary |
|---|---|
| public AbstractStringAssert A shortcut for Note that once you have navigated to the throwable's message you can't navigate back to the throwable. Example :
| |
| rootCause | back to summary |
|---|---|
| public AbstractThrowableAssert Returns a new assertion object that uses the root cause of the current Throwable as the actual Throwable under test. Examples:
| |