org.fest.assertions.error
Class ShouldContainAtIndex
java.lang.Object
org.fest.assertions.error.BasicErrorMessageFactory
org.fest.assertions.error.ShouldContainAtIndex
- All Implemented Interfaces:
- ErrorMessageFactory
public class ShouldContainAtIndex
- extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies a group of elements contains a value at a given index
failed. A group of elements can be a collection, an array or a String.
It also mention the ComparisonStrategy if the default one is not used.
- Author:
- Alex Ruiz, Joel Costigliola
shouldContainAtIndex
public static ErrorMessageFactory shouldContainAtIndex(Object actual,
Object expected,
Index index,
Object found,
org.fest.util.ComparisonStrategy comparisonStrategy)
- Creates a new
ShouldContainAtIndex.
- Parameters:
actual - the actual value in the failed assertion.expected - value expected to be in actual.index - the index of the expected value.found - the value in actual stored under index.comparisonStrategy - the ComparisonStrategy used to evaluate assertion.
- Returns:
- the created
ErrorMessageFactory.
shouldContainAtIndex
public static ErrorMessageFactory shouldContainAtIndex(Object actual,
Object expected,
Index index,
Object found)
- Creates a new
ShouldContainAtIndex.
- Parameters:
actual - the actual value in the failed assertion.expected - value expected to be in actual.index - the index of the expected value.found - the value in actual stored under index.
- Returns:
- the created
ErrorMessageFactory.
Copyright © 2007-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.