Matcher<java.lang.Iterable<T>>, SelfDescribingpublic class Every<T> extends TypeSafeDiagnosingMatcher<java.lang.Iterable<T>>
| Modifier and Type | Method | Description |
|---|---|---|
void |
describeTo(Description description) |
Generates a description of the object.
|
static <U> Matcher<java.lang.Iterable<U>> |
everyItem(Matcher<U> itemMatcher) |
Creates a matcher for
Iterables that only matches when a single pass over the
examined Iterable yields items that are all matched by the specified
itemMatcher. |
boolean |
matchesSafely(java.lang.Iterable<T> collection,
Description mismatchDescription) |
Subclasses should implement this.
|
_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdescribeMismatch, matchespublic boolean matchesSafely(java.lang.Iterable<T> collection, Description mismatchDescription)
TypeSafeDiagnosingMatchermatchesSafely in class TypeSafeDiagnosingMatcher<java.lang.Iterable<T>>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static <U> Matcher<java.lang.Iterable<U>> everyItem(Matcher<U> itemMatcher)
Iterables that only matches when a single pass over the
examined Iterable yields items that are all matched by the specified
itemMatcher.
For example:
assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))itemMatcher - the matcher to apply to every item provided by the examined Iterable