Top Description Inners Fields Constructors Methods
org.assertj.core.api

public Class ThrowableAssert<ACTUAL extends Throwable>

extends AbstractThrowableAssert<ThrowableAssert<ACTUAL extends Throwable>, ACTUAL extends Throwable>
Class Inheritance
Static Imports
org.assertj.core.error.ShouldBeInstance.shouldBeInstance

Assertion methods for Throwables.

To create a new instance of this class, invoke Assertions#assertThat(Throwable).

Authors
David DIDIER, Alex Ruiz, Joel Costigliola, Mikhail Mazursky

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Inherited from org.assertj.core.api.AbstractThrowableAssert:
throwables

Constructor Summary

AccessConstructor and Description
public
ThrowableAssert(ACTUAL actual)

public <V>

Method Summary

Modifier and TypeMethod and Description
private static <V, THROWABLE extends Throwable> THROWABLE
public static Throwable
public static <THROWABLE extends Throwable> THROWABLE
catchThrowableOfType(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type)

Deprecated
public static <THROWABLE extends Throwable> THROWABLE
catchThrowableOfType(Class<THROWABLE> type, ThrowableAssert.ThrowingCallable shouldRaiseThrowable)

Inherited from org.assertj.core.api.AbstractThrowableAssert:
causedoesNotThrowAnyExceptiondoesNotThrowAnyExceptionExceptgetCausegetRootCausehasBeenThrownhasCausehasCauseExactlyInstanceOfhasCauseInstanceOfhasCauseReferencehasMessagehasMessagehasMessageContaininghasMessageContaininghasMessageContainingAllhasMessageEndingWithhasMessageEndingWithhasMessageFindingMatchhasMessageMatchinghasMessageMatchinghasMessageNotContaininghasMessageNotContainingAnyhasMessageStartingWithhasMessageStartingWithhasNoCausehasNoSuppressedExceptionshasRootCausehasRootCauseExactlyInstanceOfhasRootCauseInstanceOfhasRootCauseMessagehasRootCauseMessagehasStackTraceContaininghasStackTraceContaininghasSuppressedExceptionmessagerootCause

Constructor Detail

ThrowableAssertback to summary
public ThrowableAssert(ACTUAL actual)
ThrowableAssertback to summary
public <V> ThrowableAssert(Callable<V> runnable)

Method Detail

buildThrowableAssertFromCallableback to summary
private static <V, THROWABLE extends Throwable> THROWABLE buildThrowableAssertFromCallable(Callable<V> callable) throws AssertionError
Annotations
@SuppressWarnings:unchecked
catchThrowableback to summary
public static Throwable catchThrowable(ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
catchThrowableOfTypeback to summary
public static <THROWABLE extends Throwable> THROWABLE catchThrowableOfType(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type)

Deprecated

Annotations
@Deprecated
catchThrowableOfTypeback to summary
public static <THROWABLE extends Throwable> THROWABLE catchThrowableOfType(Class<THROWABLE> type, ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
Annotations
@SuppressWarnings:unchecked
org.assertj.core.api back to summary

public Interface ThrowableAssert.ThrowingCallable


Method Summary

Modifier and TypeMethod and Description
public void
call()

Method Detail

callback to summary
public void call() throws Throwable