Interface CIterableVerifier<E>

    • Method Detail

      • verifyContains

        default void verifyContains​(CVerificationQueue verificationQueue,
                                    E expected)
        Verify that actual collection contains the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyContains

        default void verifyContains​(CVerificationQueue verificationQueue,
                                    E expected,
                                    java.lang.String message,
                                    java.lang.Object... params)
        Verify that actual collection contains the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyContainsAll

        default void verifyContainsAll​(CVerificationQueue verificationQueue,
                                       java.lang.Iterable<E> expected)
        Verify that actual collection contains all elements from the expected collection. Please note that actual collection might have more elements.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyContainsAll

        default void verifyContainsAll​(CVerificationQueue verificationQueue,
                                       java.lang.Iterable<E> expected,
                                       java.lang.String message,
                                       java.lang.Object... params)
        Verify that actual collection contains all elements from the expected collection. Please note that actual collection might have more elements.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyContainsNone

        default void verifyContainsNone​(CVerificationQueue verificationQueue,
                                        java.lang.Iterable<E> expected)
        Verify that actual collection contains none of elements from the expected collection.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyContainsNone

        default void verifyContainsNone​(CVerificationQueue verificationQueue,
                                        java.lang.Iterable<E> expected,
                                        java.lang.String message,
                                        java.lang.Object... params)
        Verify that actual collection contains none of elements from the expected collection.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyEmptyOrContains

        default void verifyEmptyOrContains​(CVerificationQueue verificationQueue,
                                           E expected)
        Verify that actual collection either is empty or contains the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyEmptyOrContains

        default void verifyEmptyOrContains​(CVerificationQueue verificationQueue,
                                           E expected,
                                           java.lang.String message,
                                           java.lang.Object... params)
        Verify that actual collection either is empty or contains the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyEmptyOrNotContains

        default void verifyEmptyOrNotContains​(CVerificationQueue verificationQueue,
                                              E expected)
        Verify that actual collection either is empty or does not contain the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyEmptyOrNotContains

        default void verifyEmptyOrNotContains​(CVerificationQueue verificationQueue,
                                              E expected,
                                              java.lang.String message,
                                              java.lang.Object... params)
        Verify that actual collection either is empty or does not contain the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyEquals

        default void verifyEquals​(CVerificationQueue verificationQueue,
                                  java.lang.Iterable<E> expected)
        Verify that actual and expected collections have the exact same elements. (Ignore element order) First we compare that actual collection contains all expected collection elements and then we verify that expected has all elements from actual.
        Specified by:
        verifyEquals in interface CObjectVerifier<java.lang.Iterable<E>,​CIterableState<E>>
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyEquals

        default void verifyEquals​(CVerificationQueue verificationQueue,
                                  java.lang.Iterable<E> expected,
                                  java.lang.String message,
                                  java.lang.Object... params)
        Verify that actual and expected collections have the exact same elements. (Ignore element order) First we compare that actual collection contains all expected collection elements and then we verify that expected has all elements from actual.
        Specified by:
        verifyEquals in interface CObjectVerifier<java.lang.Iterable<E>,​CIterableState<E>>
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyHas

        default void verifyHas​(CVerificationQueue verificationQueue,
                               java.util.function.Predicate<E> expected)
        Verify that actual collection contains the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - predicate
      • verifyHas

        default void verifyHas​(CVerificationQueue verificationQueue,
                               java.util.function.Predicate<E> expected,
                               java.lang.String message,
                               java.lang.Object... params)
        Verify that actual collection contains the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - predicate
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyIsEmpty

        default void verifyIsEmpty​(CVerificationQueue verificationQueue)
        Verify that actual collection is empty.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
      • verifyIsEmpty

        default void verifyIsEmpty​(CVerificationQueue verificationQueue,
                                   java.lang.String message,
                                   java.lang.Object... params)
        Verify that actual collection is empty.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyIsNotEmpty

        default void verifyIsNotEmpty​(CVerificationQueue verificationQueue)
        Verify that actual collection is not empty. (might contains null values)
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
      • verifyIsNotEmpty

        default void verifyIsNotEmpty​(CVerificationQueue verificationQueue,
                                      java.lang.String message,
                                      java.lang.Object... params)
        Verify that actual collection is not empty. (might contains null values)
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyNotContains

        default void verifyNotContains​(CVerificationQueue verificationQueue,
                                       E expected)
        Verify that actual collection does not contain the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyNotContains

        default void verifyNotContains​(CVerificationQueue verificationQueue,
                                       E expected,
                                       java.lang.String message,
                                       java.lang.Object... params)
        Verify that actual collection does not contain the expected element.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)
      • verifyNotContainsAll

        default void verifyNotContainsAll​(CVerificationQueue verificationQueue,
                                          java.lang.Iterable<E> expected)
        Verify that actual collection contains some but not all elements from the expected collection. Please note that actual collection might have some of elements but the point is to ensure that not all expected elements are exist in it.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
      • verifyNotContainsAll

        default void verifyNotContainsAll​(CVerificationQueue verificationQueue,
                                          java.lang.Iterable<E> expected,
                                          java.lang.String message,
                                          java.lang.Object... params)
        Verify that actual collection contains some but not all elements from the expected collection. Please note that actual collection might have some of elements but the point is to ensure that not all expected elements are exist in it.
        Parameters:
        verificationQueue - CTest, CVerifier or any other verification queue instance
        expected - value to compare
        message - information about the propose of verification
        params - parameters in case if message is a format String.format(java.lang.String, java.lang.Object...)