public class ThrowableMatchers
extends java.lang.Object
| Constructor and Description |
|---|
ThrowableMatchers() |
| Modifier and Type | Method and Description |
|---|---|
static org.hamcrest.Matcher<java.lang.Throwable> |
hasCauseThat(org.hamcrest.Matcher<java.lang.Throwable> throwableMatcher)
A
Matcher that matches a Throwable with a cause that matches a given matcher |
static org.hamcrest.Matcher<java.lang.Throwable> |
hasMessageThat(org.hamcrest.Matcher<java.lang.String> stringMatcher)
A
Matcher that matches a Throwable with a message that matches a given matcher |
public static org.hamcrest.Matcher<java.lang.Throwable> hasMessageThat(org.hamcrest.Matcher<java.lang.String> stringMatcher)
Matcher that matches a Throwable with a message that matches a given matcherstringMatcher - The matcher to check the Throwable message againstpublic static org.hamcrest.Matcher<java.lang.Throwable> hasCauseThat(org.hamcrest.Matcher<java.lang.Throwable> throwableMatcher)
Matcher that matches a Throwable with a cause that matches a given matcherthrowableMatcher - The matcher to check the Throwable cause against