org.fest.assertions.error
Class ShouldContainString

java.lang.Object
  extended by org.fest.assertions.error.BasicErrorMessageFactory
      extended by 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 Summary
static ErrorMessageFactory shouldContain(String actual, String sequence)
          Creates a new ShouldContainString.
static ErrorMessageFactory shouldContain(String actual, String sequence, org.fest.util.ComparisonStrategy comparisonStrategy)
          Creates a new ShouldContainString.
static ErrorMessageFactory shouldContainIgnoringCase(String actual, String sequence)
          Creates a new ShouldContainString.
 
Methods inherited from class org.fest.assertions.error.BasicErrorMessageFactory
create, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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,
                                                org.fest.util.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.


Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.