Class ShouldSatisfyOnlyOnce

java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.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 Details

    • NO_ELEMENT_SATISFIED_REQUIREMENTS

      private static final String NO_ELEMENT_SATISFIED_REQUIREMENTS
      See Also:
    • MORE_THAN_ONE_ELEMENT_SATISFIED_REQUIREMENTS

      private static final String MORE_THAN_ONE_ELEMENT_SATISFIED_REQUIREMENTS
      See Also:
  • Constructor Details

    • ShouldSatisfyOnlyOnce

      private ShouldSatisfyOnlyOnce(Iterable<?> actual)
    • ShouldSatisfyOnlyOnce

      private ShouldSatisfyOnlyOnce(Iterable<?> actual, List<?> satisfiedElements)
  • Method Details

    • shouldSatisfyOnlyOnce

      public static <E> ErrorMessageFactory shouldSatisfyOnlyOnce(Iterable<? extends E> actual, 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.