public class ThrowableAssert extends AbstractThrowableAssert<ThrowableAssert,Throwable>
Throwable
s.
To create a new instance of this class, invoke
.
Assertions.assertThat(Throwable)
Modifier and Type | Class and Description |
---|---|
static interface |
ThrowableAssert.ThrowingCallable |
actual, info, myself, throwUnsupportedExceptionOnEquals
Constructor and Description |
---|
ThrowableAssert(Callable<V> runnable) |
ThrowableAssert(Throwable actual) |
Modifier and Type | Method and Description |
---|---|
static Throwable |
catchThrowable(ThrowableAssert.ThrowingCallable shouldRaiseThrowable) |
static <THROWABLE extends Throwable> |
catchThrowableOfType(ThrowableAssert.ThrowingCallable shouldRaiseThrowable,
Class<THROWABLE> type) |
doesNotThrowAnyException, hasBeenThrown, hasCause, hasCauseExactlyInstanceOf, hasCauseInstanceOf, hasMessage, hasMessage, hasMessageContaining, hasMessageEndingWith, hasMessageFindingMatch, hasMessageMatching, hasMessageNotContaining, hasMessageStartingWith, hasNoCause, hasNoSuppressedExceptions, hasRootCause, hasRootCauseExactlyInstanceOf, hasRootCauseInstanceOf, hasStackTraceContaining, hasSuppressedException
as, as, extracting, extracting, extracting, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveComparison, usingRecursiveComparison
asList, asString, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnError
public ThrowableAssert(Throwable actual)
public ThrowableAssert(Callable<V> runnable)
public static Throwable catchThrowable(ThrowableAssert.ThrowingCallable shouldRaiseThrowable)
public static <THROWABLE extends Throwable> THROWABLE catchThrowableOfType(ThrowableAssert.ThrowingCallable shouldRaiseThrowable, Class<THROWABLE> type)
Copyright © 2014–2019 AssertJ. All rights reserved.