Class ShouldSatisfyOnlyOnce

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldSatisfyOnlyOnce
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that requirements are not satisfied only once.
    • Field Detail

      • NO_ELEMENT_SATISFIED_REQUIREMENTS

        private static final java.lang.String NO_ELEMENT_SATISFIED_REQUIREMENTS
        See Also:
        Constant Field Values
      • MORE_THAN_ONE_ELEMENT_SATISFIED_REQUIREMENTS

        private static final java.lang.String MORE_THAN_ONE_ELEMENT_SATISFIED_REQUIREMENTS
        See Also:
        Constant Field Values
    • Constructor Detail

      • ShouldSatisfyOnlyOnce

        private ShouldSatisfyOnlyOnce​(java.lang.Iterable<?> actual)
      • ShouldSatisfyOnlyOnce

        private ShouldSatisfyOnlyOnce​(java.lang.Iterable<?> actual,
                                      java.util.List<?> satisfiedElements)
    • Method Detail

      • shouldSatisfyOnlyOnce

        public static <E> ErrorMessageFactory shouldSatisfyOnlyOnce​(java.lang.Iterable<? extends E> actual,
                                                                    java.util.List<? extends E> satisfiedElements)
        Creates a new ShouldSatisfyOnlyOnce.
        Type Parameters:
        E - the iterable elements type.
        Parameters:
        actual - the actual iterable in the failed assertion.
        satisfiedElements - the elements which satisfied the requirement
        Returns:
        the created ErrorMessageFactory.