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.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.