public class ThrowableSubject extends Subject<ThrowableSubject,Throwable>
Throwable subjects.| Modifier and Type | Method and Description |
|---|---|
ThrowableSubject |
hasCauseThat()
Returns a new
ThrowableSubject that supports assertions on this throwable's direct
cause. |
StringSubject |
hasMessageThat()
Returns a
StringSubject to make assertions about the throwable's message. |
actual, actualAsString, actualCustomStringRepresentation, check, check, equals, fail, fail, fail, failWithActual, failWithActual, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutActual, failWithoutSubject, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNotSameInstanceAs, isNull, isSameAs, isSameInstanceAs, named, toStringpublic final StringSubject hasMessageThat()
StringSubject to make assertions about the throwable's message.public final ThrowableSubject hasCauseThat()
ThrowableSubject that supports assertions on this throwable's direct
cause. This method can be invoked repeatedly (e.g. assertThat(e).hasCauseThat().hasCauseThat().... to assert on a particular indirect cause.Copyright © 2019. All rights reserved.