Class ShouldContainString

java.lang.Object
org.fest.assertions.error.BasicErrorMessageFactory
org.fest.assertions.error.ShouldContainString
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldContainString extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a String contains another String failed.
Author:
Alex Ruiz, Joel Costigliola
  • Method Details

    • shouldContain

      public static ErrorMessageFactory shouldContain(String actual, String sequence)
      Creates a new ShouldContainString.
      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(String actual, String sequence, ComparisonStrategy comparisonStrategy)
      Creates a new ShouldContainString.
      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.
    • shouldContainIgnoringCase

      public static ErrorMessageFactory shouldContainIgnoringCase(String actual, String sequence)
      Creates a new ShouldContainString.
      Parameters:
      actual - the actual value in the failed assertion.
      sequence - the sequence of values expected to be in actual.
      Returns:
      the created ErrorMessageFactory.