public class ThrowableCauseMatcher extends org.hamcrest.TypeSafeMatcher<Throwable>
TypeSafeMatcher for matching instances of
Throwable by considering the cause of the Throwable
When passed a throwable for matching, this implementation will apply another
matcher to both that throwable and its cause. If the 'directly' flag is set
to false, then it will also continue recursively up the cause stace of the
throwable looking for a match| Constructor and Description |
|---|
ThrowableCauseMatcher(org.hamcrest.Matcher<?> causeMatcher)
Constructor
|
ThrowableCauseMatcher(org.hamcrest.Matcher<?> causeMatcher,
boolean directly)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
boolean |
matchesSafely(Throwable throwable) |
describeMismatch, describeMismatchSafely, matchespublic ThrowableCauseMatcher(org.hamcrest.Matcher<?> causeMatcher,
boolean directly)
causeMatcher - directly - public ThrowableCauseMatcher(org.hamcrest.Matcher<?> causeMatcher)
causeMatcher - Copyright © 2007-2019 Ikasan. All Rights Reserved.