Class ShouldNotHave

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldNotHave
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that a value does not satisfy a Condition failed.
    Author:
    Yvonne Wang, Mikhail Mazursky
    • Constructor Detail

      • ShouldNotHave

        private ShouldNotHave​(Object actual,
                              Condition<?> condition)
    • Method Detail

      • shouldNotHave

        public static <T> ErrorMessageFactory shouldNotHave​(T actual,
                                                            Condition<? super T> condition)
        Creates a new ShouldNotHave.
        Type Parameters:
        T - guarantees that the type of the actual value and the generic type of the Condition are the same.
        Parameters:
        actual - the actual value in the failed assertion.
        condition - the Condition.
        Returns:
        the created ErrorMessageFactory.