org.ikasan.framework.exception.matching
Class ThrowableMessageMatcher
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<Throwable>
org.ikasan.framework.exception.matching.ThrowableMessageMatcher
- All Implemented Interfaces:
- org.hamcrest.Matcher<Throwable>, org.hamcrest.SelfDescribing
public class ThrowableMessageMatcher
- extends org.hamcrest.TypeSafeMatcher<Throwable>
Implementation of TypeSafeMatcher for matching instances of Throwable
by considering the message of the Throwable
For now only supports direct matches of a supplied substring within the Throwable's message
In future could be extended to support a more powerful regular expression match
- Author:
- Ikasan Development Team
| Methods inherited from class org.hamcrest.TypeSafeMatcher |
matches |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
ThrowableMessageMatcher
public ThrowableMessageMatcher(String substring)
- Constructor
- Parameters:
substring -
matchesSafely
public boolean matchesSafely(Throwable throwable)
- Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<Throwable>
describeTo
public void describeTo(org.hamcrest.Description description)
Copyright © 2007-2012 Ikasan. All Rights Reserved.