public class ListsMatching<T> extends BaseMatcher<Iterable<T>>
ListsMembers
matcher, this matcher does not attempt to compare members using equals()
.
The ListsMembers
matcher is preferred when member equals
methods are defined based on a few "primary key" fields.
In other cases, this matcher may provide a more precise description of match failures. But, unlike ListsMembers
,
this matcher cannot always verify that an expected member is missing or that an actual member does not belong.Modifier and Type | Class and Description |
---|---|
static class |
ListsMatching.Supplier<T,S extends Iterable<T>>
Builds and supplies a
ListsMatching matcher for a specified source Iterable. |
Constructor and Description |
---|
ListsMatching(Iterable<? extends T> expected,
Function<T,Matcher<T>> memberMatcherSupplier)
Creates a new ListsMatching instance.
|
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 boolean matches(Object actual)
public void describeTo(Description description)
public void describeMismatch(Object actual, Description description)
describeMismatch
in interface Matcher<Iterable<T>>
describeMismatch
in class BaseMatcher<Iterable<T>>
public String toString()
toString
in class BaseMatcher<Iterable<T>>
Copyright © 2022 The Cornutum Project. All rights reserved.