Class ShouldNotAccept

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldNotAccept
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that Predicate not accepting a value failed.
    • Constructor Detail

      • ShouldNotAccept

        private ShouldNotAccept​(java.lang.Object value,
                                PredicateDescription description)
    • Method Detail

      • shouldNotAccept

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