Class ThrowableMatcher
java.lang.Object
org.dmfs.jems2.hamcrest.matchers.throwable.ThrowableMatcher
A collection of
Matchers for Throwables.
TODO: consider implementing a custom Matcher instead of using instanceOf to get better error messages
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.hamcrest.Matcher<Throwable>static org.hamcrest.Matcher<Throwable>static org.hamcrest.Matcher<Throwable>throwable(Class<? extends Throwable> exceptionClass, Iterable<org.hamcrest.Matcher<? super Throwable>> features) static org.hamcrest.Matcher<Throwable>throwable(Class<? extends Throwable> exceptionClass, org.hamcrest.Matcher<? super Throwable>... features) static org.hamcrest.Matcher<Throwable>static org.hamcrest.Matcher<Throwable>withMessage(String message) static org.hamcrest.Matcher<Throwable>withMessage(org.hamcrest.Matcher<String> messageMatcher)
-
Constructor Details
-
ThrowableMatcher
public ThrowableMatcher()
-
-
Method Details
-
throwable
@SafeVarargs public static org.hamcrest.Matcher<Throwable> throwable(org.hamcrest.Matcher<? super Throwable>... features) -
throwable
-
throwable
-
throwable
@SafeVarargs public static org.hamcrest.Matcher<Throwable> throwable(Class<? extends Throwable> exceptionClass, org.hamcrest.Matcher<? super Throwable>... features) -
withMessage
-
withMessage
-
causedBy
-