public class ThrowableAssert extends AbstractThrowableAssert<ThrowableAssert,Throwable>
Throwables.
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, hasMessageMatching, hasMessageStartingWith, hasNoCause, hasNoSuppressedExceptions, hasRootCauseExactlyInstanceOf, hasRootCauseInstanceOf, hasStackTraceContaining, hasSuppressedExceptionas, as, extracting, extracting, extracting, getComparatorsByType, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForTypeasList, 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, setCustomRepresentation, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, withFailMessage, withRepresentation, withThreadDumpOnErrorpublic 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–2018 AssertJ. All rights reserved.