Class ShouldContainExactlyInAnyOrder

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldContainExactlyInAnyOrder
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies a group of elements contains exactly a given set of values and nothing else failed. A group of elements can be a collection, an array or a String.
    • Constructor Detail

      • ShouldContainExactlyInAnyOrder

        private ShouldContainExactlyInAnyOrder​(java.lang.Object actual,
                                               java.lang.Object expected,
                                               java.lang.Iterable<?> notFound,
                                               java.lang.Iterable<?> notExpected,
                                               ComparisonStrategy comparisonStrategy)
    • Method Detail

      • shouldContainExactlyInAnyOrder

        public static ErrorMessageFactory shouldContainExactlyInAnyOrder​(java.lang.Object actual,
                                                                         java.lang.Object expected,
                                                                         java.lang.Iterable<?> notFound,
                                                                         java.lang.Iterable<?> notExpected,
                                                                         ComparisonStrategy comparisonStrategy)
        Parameters:
        actual - the actual value in the failed assertion.
        expected - values expected to be contained in actual.
        notFound - values in expected not found in actual.
        notExpected - values in actual that were not in expected.
        comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
        Returns:
        the created ErrorMessageFactory.