| Modifier and Type | Field and Description |
|---|---|
| private final Matcher |
| 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 | |
| public static <T> Matcher | |
| public static <T> Matcher | hasItems(Matcher<? super T>...
the matchers to apply to items provided by the examined itemMatchers)IterableCreates a matcher for |
| public static <T> Matcher | |
| protected boolean | matchesSafely(Iterable<? super T> collection, Description mismatchDescription)
Implements abstract org. |
| elementMatcher | back to summary |
|---|---|
| private final Matcher<? super T> elementMatcher | |
| 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 Creates a matcher for For example: assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
| |
| hasItem | back to summary |
|---|---|
| public static <T> Matcher Creates a matcher for For example: assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))
| |
| hasItems | back to summary |
|---|---|
| public static <T> Matcher Creates a matcher for For example: assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))
| |
| hasItems | back to summary |
|---|---|
| public static <T> Matcher Creates a matcher for For example: 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.
| |