Deprecated
As of release 2.1, replaced by IsIterableContaining.
| Modifier and Type | Field and Description |
|---|---|
| private final IsIterableContaining |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | describeTo(Description
The description to be built or appended to. description)Implements org. |
| public static <T> Matcher | hasItem(Matcher<? super T>
the matcher to apply to items provided by the examined itemMatcher)Iterable
Deprecated
As of version 2.1, use
Creates a matcher for IsIterableContaining#hasItem(Matcher).
Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is matched by the specified
itemMatcher.
|
| public static <T> Matcher | hasItem(T
the item to compare against the items provided by the examined item)Iterable
Deprecated
As of version 2.1, use
Creates a matcher for IsIterableContaining#hasItem(Object).
Iterables that only matches when a single pass over the
examined Iterable yields at least one item that is equal to the specified
item.
|
| public static <T> Matcher | hasItems(Matcher<? super T>...
the matchers to apply to items provided by the examined itemMatchers)Iterable
Deprecated
As of version 2.1, use
Creates a matcher for IsIterableContaining#hasItems(Matcher[])}.
Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is matched by the corresponding
matcher from the specified itemMatchers.
|
| public static <T> Matcher | hasItems(T...
the items to compare against the items provided by the examined items)Iterable
Deprecated
As of version 2.1, use
Creates a matcher for IsIterableContaining#hasItems(Object[])}.
Iterables that matches when consecutive passes over the
examined Iterable yield at least one item that is equal to the corresponding
item from the specified items.
|
| protected boolean | matchesSafely(Iterable<? super T> collection, Description mismatchDescription)
Implements abstract org. |
| delegate | back to summary |
|---|---|
| private final IsIterableContaining<T> delegate | |
| IsCollectionContaining | back to summary |
|---|---|
| public IsCollectionContaining(Matcher<? super T> elementMatcher) | |
| describeTo | back to summary |
|---|---|
| public void describeTo(Description description) Implements org. Doc from org. Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.
| |
| hasItem | back to summary |
|---|---|
| public static <T> Matcher Deprecated As of version 2.1, use Creates a matcher for assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
| |
| hasItem | back to summary |
|---|---|
| public static <T> Matcher Deprecated As of version 2.1, use Creates a matcher for assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))
| |
| hasItems | back to summary |
|---|---|
| public static <T> Matcher Deprecated As of version 2.1, use Creates a matcher for assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))
| |
| hasItems | back to summary |
|---|---|
| public static <T> Matcher Deprecated As of version 2.1, use Creates a matcher for assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))
| |
| matchesSafely | back to summary |
|---|---|
| protected boolean matchesSafely(Iterable<? super T> collection, Description mismatchDescription) Implements abstract org. Doc from org. Subclasses should implement this. The item will already have been checked for the specific type and will never be null.
| |