ArrayMatching
.@Deprecated public class IsArrayContainingInAnyOrder<E> extends TypeSafeMatcher<E[]>
Constructor and Description |
---|
IsArrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> matchers)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <E> Matcher<E[]> |
arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers)
Deprecated.
As of version 2.1, use
ArrayMatching.arrayContainingInAnyOrder(Collection) . |
static <E> Matcher<E[]> |
arrayContainingInAnyOrder(E... items)
Deprecated.
As of version 2.1, use
ArrayMatching.arrayContainingInAnyOrder(Object[]) . |
static <E> Matcher<E[]> |
arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers)
Deprecated.
As of version 2.1, use
ArrayMatching.arrayContainingInAnyOrder(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[]> arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers)
ArrayMatching.arrayContainingInAnyOrder(Matcher[])
.N.B. each of the specified matchers will only be used once during a given examination, so be careful when specifying matchers that may be satisfied by more than one entry in an examined array.
For example:
assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(equalTo("bar"), equalTo("foo")))
itemMatchers
- a list of matchers, each of which must be satisfied by an entry in an examined arraypublic static <E> Matcher<E[]> arrayContainingInAnyOrder(java.util.Collection<Matcher<? super E>> itemMatchers)
ArrayMatching.arrayContainingInAnyOrder(Collection)
.N.B. each matcher in the specified collection will only be used once during a given examination, so be careful when specifying matchers that may be satisfied by more than one entry in an examined array.
For example:
assertThat(new String[]{"foo", "bar"}, arrayContainingInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
itemMatchers
- a list of matchers, each of which must be satisfied by an item provided by an examined arraypublic static <E> Matcher<E[]> arrayContainingInAnyOrder(E... items)
ArrayMatching.arrayContainingInAnyOrder(Object[])
.N.B. each of the specified items will only be used once during a given examination, so be careful when specifying items that may be equal to more than one entry in an examined array.
For example:
assertThat(new String[]{"foo", "bar"}, containsInAnyOrder("bar", "foo"))
items
- the items that must equal the entries of an examined array, in any order