public class ContainsElements<T> extends BaseMatcher<T[]>
equals
-matching counterpart in the given expected array.Modifier and Type | Class and Description |
---|---|
static class |
ContainsElements.Supplier<T>
Builds and supplies a
ContainsElements matcher for a specified source array. |
Constructor and Description |
---|
ContainsElements(T[] expected)
Creates a new ContainsElements instance.
|
ContainsElements(T[] expected,
Function<T,Matcher<T>> elementMatcherSupplier)
Creates a new ContainsElements instance that adds an additional match condition: each element of a
matched array must satisfy the Matcher returned by the given supplier for its
equals -matching
counterpart in the given expected array. |
Modifier and Type | Method and Description |
---|---|
void |
describeMismatch(Object actual,
Description description) |
void |
describeTo(Description description) |
boolean |
matches(Object actual) |
String |
toString() |
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull
public ContainsElements(T[] expected)
public ContainsElements(T[] expected, Function<T,Matcher<T>> elementMatcherSupplier)
equals
-matching
counterpart in the given expected array.public boolean matches(Object actual)
public void describeTo(Description description)
public void describeMismatch(Object actual, Description description)
describeMismatch
in interface Matcher<T[]>
describeMismatch
in class BaseMatcher<T[]>
public String toString()
toString
in class BaseMatcher<T[]>
Copyright © 2022 The Cornutum Project. All rights reserved.