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 mentions the
String.It also mentions the
ComparisonStrategy used.-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateShouldContain(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy, GroupTypeDescription groupTypeDescription) privateShouldContain(Object actual, List<String> directoryContent, String filterDescription) -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorMessageFactorydirectoryShouldContain(File actual, List<File> directoryContent, String filterDescription) static ErrorMessageFactorydirectoryShouldContain(Path actual, List<Path> directoryContent, String filterDescription) static ErrorMessageFactoryshouldContain(Class<?> clazz, Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContainstatic ErrorMessageFactoryshouldContain(Object actual, Object expected, Object notFound) Creates a new.ShouldContainstatic ErrorMessageFactoryshouldContain(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContaintoFileNames(List<File> files) toPathNames(List<Path> files) 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, GroupTypeDescription groupTypeDescription) -
ShouldContain
-
-
Method Details
-
shouldContain
public static ErrorMessageFactory shouldContain(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContain- Parameters:
actual- the actual value in the failed assertion.expected- values expected to be inactual.notFound- the values inexpectednot found inactual.comparisonStrategy- theComparisonStrategyused to evaluate assertion.- Returns:
- the created
ErrorMessageFactory.
-
shouldContain
public static ErrorMessageFactory shouldContain(Class<?> clazz, Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy) Creates a new.ShouldContain- Parameters:
clazz- the actual value class in the failed assertion.actual- the actual value in the failed assertion.expected- values expected to be inactual.notFound- the values inexpectednot found inactual.comparisonStrategy- theComparisonStrategyused to evaluate assertion.- Returns:
- the created
ErrorMessageFactory.
-
shouldContain
Creates a new.ShouldContain- Parameters:
actual- the actual value in the failed assertion.expected- values expected to be inactual.notFound- the values inexpectednot found inactual.- Returns:
- the created
ErrorMessageFactory.
-
directoryShouldContain
public static ErrorMessageFactory directoryShouldContain(File actual, List<File> directoryContent, String filterDescription) -
toFileNames
-
directoryShouldContain
public static ErrorMessageFactory directoryShouldContain(Path actual, List<Path> directoryContent, String filterDescription) -
toPathNames
-