public class ThrowableSubject extends Subject
Throwable subjects.| Modifier | Constructor and Description | 
|---|---|
protected  | 
ThrowableSubject(FailureMetadata metadata,
                Throwable throwable)
Constructor for use by subclasses. 
 | 
| 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. | 
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toStringprotected ThrowableSubject(FailureMetadata metadata, @NullableDecl Throwable throwable)
Subject.check().that(throwable).public 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.