Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldContainAtIndex

extends BasicErrorMessageFactory
Class Inheritance
Imports
org.assertj.core.data.Index, org.assertj.core.internal.ComparisonStrategy, .StandardComparisonStrategy

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.
Authors
Alex Ruiz, Joel Costigliola

Field Summary

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
ShouldContainAtIndex(Object actual, Object expected, Index index, Object found, ComparisonStrategy comparisonStrategy)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainAtIndex
(Object
the actual value in the failed assertion.
actual
,
Object
value expected to be in actual.
expected
,
Index
the index of the expected value.
index
,
Object
the value in actual stored under index.
found
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldContainAtIndex.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainAtIndex
(Object
the actual value in the failed assertion.
actual
,
Object
value expected to be in actual.
expected
,
Index
the index of the expected value.
index
,
Object
the value in actual stored under index.
found
)

Creates a new ShouldContainAtIndex.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldContainAtIndexback to summary
private ShouldContainAtIndex(Object actual, Object expected, Index index, Object found, ComparisonStrategy comparisonStrategy)

Method Detail

shouldContainAtIndexback to summary
public static ErrorMessageFactory shouldContainAtIndex(Object actual, Object expected, Index index, Object found, ComparisonStrategy comparisonStrategy)

Creates a new ShouldContainAtIndex.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

value expected to be in actual.

index:Index

the index of the expected value.

found:Object

the value in actual stored under index.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainAtIndexback to summary
public static ErrorMessageFactory shouldContainAtIndex(Object actual, Object expected, Index index, Object found)

Creates a new ShouldContainAtIndex.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

value expected to be in actual.

index:Index

the index of the expected value.

found:Object

the value in actual stored under index.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.