Package org.assertj.core.error
Class ShouldAccept
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldAccept
- All Implemented Interfaces:
ErrorMessageFactory
Creates an error message indicating that an assertion that verifies that
Predicate accepts a value failed.-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateShouldAccept(Object value, PredicateDescription description) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ErrorMessageFactoryshouldAccept(Predicate<? super T> predicate, T value, PredicateDescription description) Creates a new.ShouldAcceptMethods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Constructor Details
-
ShouldAccept
-
-
Method Details
-
shouldAccept
public static <T> ErrorMessageFactory shouldAccept(Predicate<? super T> predicate, T value, PredicateDescription description) Creates a new.ShouldAccept- Type Parameters:
T- guarantees that the type of the value value and the generic type of thePredicateare the same.- Parameters:
predicate- thePredicate.value- the value value in the failed assertion.description- predicate description to include in the error message,- Returns:
- the created
ErrorMessageFactory.
-