public class ShouldMatch extends BasicErrorMessageFactory
Predicate
failed.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADVICE |
arguments, format, formatter
Modifier | Constructor and Description |
---|---|
private |
ShouldMatch(java.lang.Object actual,
PredicateDescription description) |
Modifier and Type | Method and Description |
---|---|
static <T> ErrorMessageFactory |
shouldMatch(T actual,
java.util.function.Predicate<? super T> predicate,
PredicateDescription predicateDescription)
Creates a new
. |
create, create, create, equals, hashCode, toString, unquotedString
private ShouldMatch(java.lang.Object actual, PredicateDescription description)
public static <T> ErrorMessageFactory shouldMatch(T actual, java.util.function.Predicate<? super T> predicate, PredicateDescription predicateDescription)
ShouldMatch
.T
- guarantees that the type of the actual value and the generic type of the Predicate
are the same.actual
- the actual value in the failed assertion.predicate
- the Predicate
.predicateDescription
- predicate description to include in the error messageErrorMessageFactory
.