T - expected exception typepublic class ExceptionMatcher<T extends Throwable>
extends org.hamcrest.TypeSafeMatcher<T>
| Constructor and Description |
|---|
ExceptionMatcher(Class<T> expectedType)
Will match
Throwable instances of the given type. |
ExceptionMatcher(Class<T> expectedType,
org.hamcrest.Matcher<String> messageMatcher)
Will match
Throwable instances of the given type and if its message matches the given String Matcher. |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
protected boolean |
matchesSafely(T item) |
describeMismatch, describeMismatchSafely, matchespublic ExceptionMatcher(Class<T> expectedType)
Throwable instances of the given type. See also TypeSafeMatcher for details.expectedType - expected child class of Throwablepublic ExceptionMatcher(Class<T> expectedType, org.hamcrest.Matcher<String> messageMatcher)
Throwable instances of the given type and if its message matches the given String Matcher.
See also TypeSafeMatcher for details.expectedType - expected child class of ThrowablemessageMatcher - matcher for exception messageCopyright © 2018 willhaben internet service GmbH & Co KG. All rights reserved.