public interface Matcher<T> extends SelfDescribing
BaseMatcherabstract class, which will ensure that the Matcher API can grow to support new features and remain compatible with all Matcher implementations. For easy access to common Matcher implementations, use the static factory methods in
CoreMatchers. N.B. Well designed matchers should be immutable.
|Modifier and Type||Method and Description|
Generate a description of why the matcher has not accepted the item.
Evaluates the matcher for argument item.
item- the object against which the matcher is evaluated.
trueif item matches, otherwise
void describeMismatch(Object item, Description mismatchDescription)
matches(item)is false, but will not check this.
item- The item that the Matcher has rejected.
mismatchDescription- The description to be built or appended to.
Copyright © 2002-2012 JUnit. All Rights Reserved.