org.fest.assertions.error
Class ShouldContain

java.lang.Object
  extended by org.fest.assertions.error.BasicErrorMessageFactory
      extended by org.fest.assertions.error.ShouldContain
All Implemented Interfaces:
ErrorMessageFactory

public class ShouldContain
extends BasicErrorMessageFactory

Creates an error message indicating that an assertion that verifies a group of elements contains a given set of values failed. A group of elements can be a collection, an array or a String.
It also mention the ComparisonStrategy used.

Author:
Alex Ruiz, Joel Costigliola

Method Summary
static ErrorMessageFactory shouldContain(Object actual, Object expected, Object notFound)
          Creates a new ShouldContain.
static ErrorMessageFactory shouldContain(Object actual, Object expected, Object notFound, org.fest.util.ComparisonStrategy comparisonStrategy)
          Creates a new ShouldContain.
 
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(Object actual,
                                                Object expected,
                                                Object notFound,
                                                org.fest.util.ComparisonStrategy comparisonStrategy)
Creates a new ShouldContain.

Parameters:
actual - the actual value in the failed assertion.
expected - values expected to be in actual.
notFound - the values in expected not found in actual.
comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
Returns:
the created ErrorMessageFactory.

shouldContain

public static ErrorMessageFactory shouldContain(Object actual,
                                                Object expected,
                                                Object notFound)
Creates a new ShouldContain.

Parameters:
actual - the actual value in the failed assertion.
expected - values expected to be in actual.
notFound - the values in expected not found in actual.
Returns:
the created ErrorMessageFactory.


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