Package org.assertj.core.error
Class ShouldContain
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldContain
- All Implemented Interfaces:
ErrorMessageFactory
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
It also mention the
String
.It also mention the
ComparisonStrategy
used.-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ShouldContain
(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy) -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorMessageFactory
shouldContain
(Object actual, Object expected, Object notFound) Creates a newShouldContain
.static ErrorMessageFactory
shouldContain
(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy) Creates a newShouldContain
.Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Constructor Details
-
ShouldContain
private ShouldContain(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy)
-
-
Method Details
-
shouldContain
public static ErrorMessageFactory shouldContain(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy) Creates a newShouldContain
.- Parameters:
actual
- the actual value in the failed assertion.expected
- values expected to be inactual
.notFound
- the values inexpected
not found inactual
.comparisonStrategy
- theComparisonStrategy
used to evaluate assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldContain
Creates a newShouldContain
.- Parameters:
actual
- the actual value in the failed assertion.expected
- values expected to be inactual
.notFound
- the values inexpected
not found inactual
.- Returns:
- the created
ErrorMessageFactory
.
-