Package at.willhaben.willtest.matcher
Class ExceptionMatcher<T extends java.lang.Throwable>
- java.lang.Object
-
- org.hamcrest.BaseMatcher<T>
-
- org.hamcrest.TypeSafeMatcher<T>
-
- at.willhaben.willtest.matcher.ExceptionMatcher<T>
-
- Type Parameters:
T- expected exception type
- All Implemented Interfaces:
org.hamcrest.Matcher<T>,org.hamcrest.SelfDescribing
@Deprecated public class ExceptionMatcher<T extends java.lang.Throwable> extends org.hamcrest.TypeSafeMatcher<T>Deprecated.Matches a given exception type with an optional additional message matcher.
-
-
Constructor Summary
Constructors Constructor Description ExceptionMatcher(java.lang.Class<T> expectedType)Deprecated.Will matchThrowableinstances of the given type.ExceptionMatcher(java.lang.Class<T> expectedType, org.hamcrest.Matcher<java.lang.String> messageMatcher)Deprecated.Will matchThrowableinstances of the given type and if its message matches the given StringMatcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddescribeTo(org.hamcrest.Description description)Deprecated.protected booleanmatchesSafely(T item)Deprecated.-
Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, describeMismatchSafely, matches
-
-
-
-
Constructor Detail
-
ExceptionMatcher
public ExceptionMatcher(java.lang.Class<T> expectedType)
Deprecated.Will matchThrowableinstances of the given type. See alsoTypeSafeMatcherfor details.- Parameters:
expectedType- expected child class ofThrowable
-
ExceptionMatcher
public ExceptionMatcher(java.lang.Class<T> expectedType, org.hamcrest.Matcher<java.lang.String> messageMatcher)
Deprecated.Will matchThrowableinstances of the given type and if its message matches the given StringMatcher. See alsoTypeSafeMatcherfor details.- Parameters:
expectedType- expected child class ofThrowablemessageMatcher- matcher for exception message
-
-