T
- an exception subclasspublic class ExceptionMessageMatcher<T extends Exception> extends org.hamcrest.BaseMatcher<T>
matcher
that matches an exception with a certain
message.Modifier and Type | Field and Description |
---|---|
private org.hamcrest.Matcher<String> |
expectedMessageMatcher
The string matcher that shall match exception message.
|
Constructor and Description |
---|
ExceptionMessageMatcher(org.hamcrest.Matcher<String> expectedMessageMatcher) |
ExceptionMessageMatcher(String expectedMessage) |
Modifier and Type | Method and Description |
---|---|
void |
describeTo(org.hamcrest.Description description) |
boolean |
matches(Object obj) |
private org.hamcrest.Matcher<String> expectedMessageMatcher
public ExceptionMessageMatcher(String expectedMessage)
expectedMessage
- the expected exception messagepublic ExceptionMessageMatcher(org.hamcrest.Matcher<String> expectedMessageMatcher)
expectedMessageMatcher
- a string matcher that shall match the exception messagepublic void describeTo(org.hamcrest.Description description)
Copyright © 2014. All rights reserved.