| Modifier and Type | Field and Description |
|---|---|
| private final Matcher |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | describeMismatchSafely(T[] item, Description mismatchDescription)
Overrides org. |
| public void | describeTo(Description
The description to be built or appended to. description)Implements org. |
| public static <T> Matcher | hasItemInArray(Matcher<? super T>
the matcher to apply to elements in examined arrays elementMatcher)Creates a matcher for arrays that matches when the examined array contains at least one item
that is matched by the specified |
| public static <T> Matcher | hasItemInArray(T
the element that should be present in examined arrays element)A shortcut to the frequently used |
| public boolean | matchesSafely(T[] array)
Implements abstract org. |
| elementMatcher | back to summary |
|---|---|
| private final Matcher<? super T> elementMatcher | |
| IsArrayContaining | back to summary |
|---|---|
| public IsArrayContaining(Matcher<? super T> elementMatcher) | |
| describeMismatchSafely | back to summary |
|---|---|
| public void describeMismatchSafely(T[] item, Description mismatchDescription) Overrides org. Doc from org. Subclasses should override this. The item will already have been checked for the specific type and will never be null.
| |
| 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.
| |
| hasItemInArray | back to summary |
|---|---|
| public static <T> Matcher Creates a matcher for arrays that matches when the examined array contains at least one item
that is matched by the specified For example: assertThat(new String[] {"foo", "bar"}, hasItemInArray(startsWith("ba")))
| |
| hasItemInArray | back to summary |
|---|---|
| public static <T> Matcher A shortcut to the frequently used For example: assertThat(hasItemInArray(x))instead of: assertThat(hasItemInArray(equalTo(x)))
| |
| matchesSafely | back to summary |
|---|---|
| public boolean matchesSafely(T[] array) 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.
| |