Class ShouldContainCharSequence

java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.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.
Author:
Alex Ruiz, Joel Costigliola, Mikhail Mazursky
  • Method Details

    • shouldContain

      public static ErrorMessageFactory shouldContain(CharSequence actual, 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(Throwable actual, CharSequence sequence)
    • shouldContain

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

      public static ErrorMessageFactory shouldContain(CharSequence actual, CharSequence sequence, org.assertj.core.internal.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(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, org.assertj.core.internal.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(CharSequence actual, CharSequence[] strings, Set<? extends 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(CharSequence actual, 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(CharSequence actual, CharSequence sequence, org.assertj.core.internal.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(CharSequence actual, CharSequence[] strings, Set<? extends CharSequence> notFound, org.assertj.core.internal.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(CharSequence actual, CharSequence[] expectedValues, Set<? extends CharSequence> notFound, org.assertj.core.internal.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.