T
- the type of the throwable being matchedpublic class ThrowableCauseMatcher<T extends Throwable>
extends org.hamcrest.TypeSafeMatcher<T>
Constructor and Description |
---|
ThrowableCauseMatcher(org.hamcrest.Matcher<? extends Throwable> causeMatcher) |
Modifier and Type | Method and Description |
---|---|
protected void |
describeMismatchSafely(T item,
org.hamcrest.Description description) |
void |
describeTo(org.hamcrest.Description description) |
static <T extends Throwable> |
hasCause(org.hamcrest.Matcher<? extends Throwable> matcher)
Returns a matcher that verifies that the outer exception has a cause for which the supplied matcher
evaluates to true.
|
protected boolean |
matchesSafely(T item) |
public ThrowableCauseMatcher(org.hamcrest.Matcher<? extends Throwable> causeMatcher)
public void describeTo(org.hamcrest.Description description)
protected boolean matchesSafely(T item)
protected void describeMismatchSafely(T item, org.hamcrest.Description description)
public static <T extends Throwable> org.hamcrest.Matcher<T> hasCause(org.hamcrest.Matcher<? extends Throwable> matcher)
T
- type of the outer exceptionmatcher
- to apply to the cause of the outer exceptionCopyright © 2002–2022 JUnit. All rights reserved.