Class ShouldContainCharSequence

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldContainCharSequence
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that a CharSequence contains another CharSequence failed.
    • Constructor Detail

      • ShouldContainCharSequence

        private ShouldContainCharSequence​(java.lang.String format,
                                          java.lang.CharSequence actual,
                                          java.lang.CharSequence sequence,
                                          ComparisonStrategy comparisonStrategy)
      • ShouldContainCharSequence

        private ShouldContainCharSequence​(java.lang.String format,
                                          java.lang.CharSequence actual,
                                          java.lang.CharSequence[] values,
                                          java.util.Set<? extends java.lang.CharSequence> notFound,
                                          ComparisonStrategy comparisonStrategy)
    • Method Detail

      • shouldContain

        public static ErrorMessageFactory shouldContain​(java.lang.CharSequence actual,
                                                        java.lang.CharSequence sequence)
        Parameters:
        actual - the actual value in the failed assertion.
        sequence - the sequence of values expected to be in actual.
        Returns:
        the created ErrorMessageFactory.
      • shouldContain

        public static ErrorMessageFactory shouldContain​(java.lang.Throwable actual,
                                                        java.lang.CharSequence sequence)
      • shouldContain

        public static ErrorMessageFactory shouldContain​(java.lang.Throwable actual,
                                                        java.lang.CharSequence[] sequence,
                                                        java.util.Set<? extends java.lang.CharSequence> notFound)
      • shouldContain

        public static ErrorMessageFactory shouldContain​(java.lang.CharSequence actual,
                                                        java.lang.CharSequence sequence,
                                                        ComparisonStrategy comparisonStrategy)
        Parameters:
        actual - the actual value in the failed assertion.
        sequence - the sequence of values expected to be in actual.
        comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
        Returns:
        the created ErrorMessageFactory.
      • shouldContain

        public static ErrorMessageFactory shouldContain​(java.lang.CharSequence actual,
                                                        java.lang.CharSequence[] strings,
                                                        java.util.Set<? extends java.lang.CharSequence> notFound,
                                                        ComparisonStrategy comparisonStrategy)
        Parameters:
        actual - the actual value in the failed assertion.
        strings - the sequence of values expected to be in actual.
        notFound - the values not found.
        comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
        Returns:
        the created ErrorMessageFactory.
      • shouldContain

        public static ErrorMessageFactory shouldContain​(java.lang.CharSequence actual,
                                                        java.lang.CharSequence[] strings,
                                                        java.util.Set<? extends java.lang.CharSequence> notFound)
        Parameters:
        actual - the actual value in the failed assertion.
        strings - the sequence of values expected to be in actual.
        notFound - the values not found.
        Returns:
        the created ErrorMessageFactory.
      • shouldContainIgnoringCase

        public static ErrorMessageFactory shouldContainIgnoringCase​(java.lang.CharSequence actual,
                                                                    java.lang.CharSequence sequence)
        Parameters:
        actual - the actual value in the failed assertion.
        sequence - the sequence of values expected to be in actual.
        Returns:
        the created ErrorMessageFactory.
      • shouldContainIgnoringWhitespaces

        public static ErrorMessageFactory shouldContainIgnoringWhitespaces​(java.lang.CharSequence actual,
                                                                           java.lang.CharSequence sequence,
                                                                           ComparisonStrategy comparisonStrategy)
        Parameters:
        actual - the actual value in the failed assertion.
        sequence - the sequence of values expected to be in actual.
        comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
        Returns:
        the created ErrorMessageFactory.
      • shouldContainIgnoringWhitespaces

        public static ErrorMessageFactory shouldContainIgnoringWhitespaces​(java.lang.CharSequence actual,
                                                                           java.lang.CharSequence[] strings,
                                                                           java.util.Set<? extends java.lang.CharSequence> notFound,
                                                                           ComparisonStrategy comparisonStrategy)
        Parameters:
        actual - the actual value in the failed assertion.
        strings - the sequence of values expected to be in actual.
        notFound - the values not found.
        comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
        Returns:
        the created ErrorMessageFactory.
      • containsIgnoringNewLines

        public static ErrorMessageFactory containsIgnoringNewLines​(java.lang.CharSequence actual,
                                                                   java.lang.CharSequence[] expectedValues,
                                                                   java.util.Set<? extends java.lang.CharSequence> notFound,
                                                                   ComparisonStrategy comparisonWay)
        Parameters:
        actual - the actual value in the failed assertion.
        expectedValues - the sequence of values expected to be in actual.
        notFound - the values not found.
        comparisonWay - the ComparisonStrategy to evaluate assertion.
        Returns:
        the created ErrorMessageFactory.