public class ListWithAnyOfMatcher extends ListMatcher
matchers match against at least one item in a given List.| Constructor and Description |
|---|
ListWithAnyOfMatcher(org.hamcrest.Matcher... matchers)
Construct a matcher that will return true if any of the given
matchers matches against at least one
item in a given List. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
describeCollectionType(org.hamcrest.Description description)
Describes the type of collection expected.
|
protected String |
failedMatcherMessage()
The message to append behind a failing matcher.
|
protected String |
getLastSeparator()
The separator to use between the two last events.
|
boolean |
matchesList(List<?> items)
Evaluates the matcher for argument
item. |
describeTo, getMatchers, matches, matchRemainder, reportFailedpublic ListWithAnyOfMatcher(org.hamcrest.Matcher... matchers)
matchers matches against at least one
item in a given List.matchers - The matchers that must match against at least one item in the list.public boolean matchesList(List<?> items)
ListMatcheritem. The item has been verified to be a list, but the exact
type of contents of a list cannot be verified, due to Erasure of Generic Types.matchesList in class ListMatcheritems - the object against which the matcher is evaluated.true if item matches, otherwise false.BaseMatcherprotected void describeCollectionType(org.hamcrest.Description description)
ListMatcherdescribeCollectionType in class ListMatcherdescription - the description to append the collection type toprotected String failedMatcherMessage()
ListMatcherfailedMatcherMessage in class ListMatcherprotected String getLastSeparator()
ListMatchergetLastSeparator in class ListMatcherCopyright © 2010-2014. All Rights Reserved.