public class ConsistencyMatcher<T>
extends org.hamcrest.BaseMatcher<T>
This Matcher will check that tested 'item' and predefined 'value' are either both consistently
match specified delegate matcher, or both consistently doesn't match it.
For example, if Matchers.startsWith("q") was used as delegate, then:
Matcher is useful in cases when you have a "model" value, and you need to test some item against it, by some predicates. Matcher also provides informative messages, about tested and predefined values.
| Constructor and Description |
|---|
ConsistencyMatcher(T value,
org.hamcrest.Matcher<? super T> matcher) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
org.hamcrest.Matcher<? super T> |
getMatcher() |
T |
getValue() |
boolean |
matches(java.lang.Object item) |