ArrayMatching
.public class IsArrayContainingInOrder<E> extends TypeSafeMatcher<E[]>
Constructor and Description |
---|
IsArrayContainingInOrder(java.util.List<Matcher<? super E>> matchers)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <E> Matcher<E[]> |
arrayContaining(E... items)
Deprecated.
As of version 2.1, use
ArrayMatching.arrayContaining(Object[]) . |
static <E> Matcher<E[]> |
arrayContaining(java.util.List<Matcher<? super E>> itemMatchers)
Deprecated.
As of version 2.1, use
ArrayMatching.arrayContaining(List) . |
static <E> Matcher<E[]> |
arrayContaining(Matcher<? super E>... itemMatchers)
Deprecated.
As of version 2.1, use
ArrayMatching.arrayContaining(Matcher[]) . |
void |
describeMismatchSafely(E[] item,
Description mismatchDescription)
Deprecated.
Subclasses should override this.
|
void |
describeTo(Description description)
Deprecated.
Generates a description of the object.
|
boolean |
matchesSafely(E[] item)
Deprecated.
Subclasses should implement this.
|
describeMismatch, matches
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
public boolean matchesSafely(E[] item)
TypeSafeMatcher
matchesSafely
in class TypeSafeMatcher<E[]>
public void describeMismatchSafely(E[] item, Description mismatchDescription)
TypeSafeMatcher
describeMismatchSafely
in class TypeSafeMatcher<E[]>
public void describeTo(Description description)
SelfDescribing
description
- The description to be built or appended to.public static <E> Matcher<E[]> arrayContaining(E... items)
ArrayMatching.arrayContaining(Object[])
.For example:
assertThat(new String[]{"foo", "bar"}, contains("foo", "bar"))
items
- the items that must equal the items within an examined arraypublic static <E> Matcher<E[]> arrayContaining(Matcher<? super E>... itemMatchers)
ArrayMatching.arrayContaining(Matcher[])
.For example:
assertThat(new String[]{"foo", "bar"}, contains(equalTo("foo"), equalTo("bar")))
itemMatchers
- the matchers that must be satisfied by the items in the examined arraypublic static <E> Matcher<E[]> arrayContaining(java.util.List<Matcher<? super E>> itemMatchers)
ArrayMatching.arrayContaining(List)
.For example:
assertThat(new String[]{"foo", "bar"}, contains(Arrays.asList(equalTo("foo"), equalTo("bar"))))
itemMatchers
- a list of matchers, each of which must be satisfied by the corresponding item in an examined array