Class ThrowableAssert<ACTUAL extends Throwable>
java.lang.Object
org.assertj.core.api.AbstractAssert<ThrowableAssert<ACTUAL>, ACTUAL>
org.assertj.core.api.AbstractObjectAssert<ThrowableAssert<ACTUAL>, ACTUAL>
org.assertj.core.api.AbstractThrowableAssert<ThrowableAssert<ACTUAL>, ACTUAL>
org.assertj.core.api.ThrowableAssert<ACTUAL>
- All Implemented Interfaces:
Assert<ThrowableAssert<ACTUAL>, ACTUAL>, Descriptable<ThrowableAssert<ACTUAL>>, ExtensionPoints<ThrowableAssert<ACTUAL>, ACTUAL>
public class ThrowableAssert<ACTUAL extends Throwable>
extends AbstractThrowableAssert<ThrowableAssert<ACTUAL>, ACTUAL>
Assertion methods for
Throwables.
To create a new instance of this class, invoke .
Assertions.assertThat(Throwable)
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class AbstractThrowableAssert
throwablesFields inherited from class AbstractAssert
actual, assertionErrorCreator, conditions, customRepresentation, info, myself, objects, printAssertionsDescription, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsModifierConstructorDescriptionThrowableAssert(ACTUAL actual) <V>ThrowableAssert(Callable<V> runnable) -
Method Summary
Modifier and TypeMethodDescriptionprivate static <V, THROWABLE extends Throwable>
THROWABLEbuildThrowableAssertFromCallable(Callable<V> callable) static ThrowablecatchThrowable(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) static <THROWABLE extends Throwable>
THROWABLEcatchThrowableOfType(Class<THROWABLE> type, ThrowableAssert.ThrowingCallable shouldRaiseThrowable) static <THROWABLE extends Throwable>
THROWABLEcatchThrowableOfType(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) Deprecated.Methods inherited from class AbstractThrowableAssert
cause, doesNotThrowAnyException, doesNotThrowAnyExceptionExcept, getCause, getRootCause, hasBeenThrown, hasCause, hasCauseExactlyInstanceOf, hasCauseInstanceOf, hasCauseReference, hasMessage, hasMessage, hasMessageContaining, hasMessageContaining, hasMessageContainingAll, hasMessageEndingWith, hasMessageEndingWith, hasMessageFindingMatch, hasMessageMatching, hasMessageMatching, hasMessageNotContaining, hasMessageNotContainingAny, hasMessageStartingWith, hasMessageStartingWith, hasNoCause, hasNoSuppressedExceptions, hasRootCause, hasRootCauseExactlyInstanceOf, hasRootCauseInstanceOf, hasRootCauseMessage, hasRootCauseMessage, hasStackTraceContaining, hasStackTraceContaining, hasSuppressedException, message, rootCauseMethods inherited from class AbstractObjectAssert
as, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withAssertionState, withComparatorByPropertyOrField, withTypeComparatorMethods inherited from class AbstractAssert
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnErrorMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Descriptable
as, describedAs, describedAs
-
Constructor Details
-
ThrowableAssert
-
ThrowableAssert
-
-
Method Details
-
buildThrowableAssertFromCallable
private static <V, THROWABLE extends Throwable> THROWABLE buildThrowableAssertFromCallable(Callable<V> callable) throws AssertionError - Throws:
AssertionError
-
catchThrowable
-
catchThrowableOfType
@Deprecated public static <THROWABLE extends Throwable> THROWABLE catchThrowableOfType(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type) Deprecated. -
catchThrowableOfType
public static <THROWABLE extends Throwable> THROWABLE catchThrowableOfType(Class<THROWABLE> type, ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
-