Class ShouldNotMatch

All Implemented Interfaces:
ErrorMessageFactory

public class ShouldNotMatch extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a value not satisfying a Predicate failed.
  • Field Details

    • ADVICE

      public static final String ADVICE
  • Method Details

    • shouldNotMatch

      public static <T> ErrorMessageFactory shouldNotMatch(T actual, Predicate<? super T> predicate, PredicateDescription predicateDescription)
      Creates a new ShouldNotMatch.
      Type Parameters:
      T - guarantees that the type of the actual value and the generic type of the Predicate are the same.
      Parameters:
      actual - the actual value in the failed assertion.
      predicate - the Predicate.
      predicateDescription - predicate description to include in the error message
      Returns:
      the created ErrorMessageFactory.