Package org.assertj.core.error
Class ShouldContainAtIndex
- java.lang.Object
-
- org.assertj.core.error.BasicErrorMessageFactory
-
- org.assertj.core.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 aString
.
It also mention theComparisonStrategy
if the default one is not used.- Author:
- Alex Ruiz, Joel Costigliola
-
-
Field Summary
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ShouldContainAtIndex(Object actual, Object expected, Index index, Object found, ComparisonStrategy comparisonStrategy)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ErrorMessageFactory
shouldContainAtIndex(Object actual, Object expected, Index index, Object found)
Creates a new
.ShouldContainAtIndex
static ErrorMessageFactory
shouldContainAtIndex(Object actual, Object expected, Index index, Object found, ComparisonStrategy comparisonStrategy)
Creates a new
.ShouldContainAtIndex
-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Constructor Detail
-
ShouldContainAtIndex
private ShouldContainAtIndex(Object actual, Object expected, Index index, Object found, ComparisonStrategy comparisonStrategy)
-
-
Method Detail
-
shouldContainAtIndex
public static ErrorMessageFactory shouldContainAtIndex(Object actual, Object expected, Index index, Object found, ComparisonStrategy comparisonStrategy)
Creates a new
.ShouldContainAtIndex
- Parameters:
actual
- the actual value in the failed assertion.expected
- value expected to be inactual
.index
- the index of the expected value.found
- the value inactual
stored underindex
.comparisonStrategy
- theComparisonStrategy
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 inactual
.index
- the index of the expected value.found
- the value inactual
stored underindex
.- Returns:
- the created
ErrorMessageFactory
.
-
-