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

public Class ShouldNotContain

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
java.util.stream.Collectors.toList

Creates an error message indicating that an assertion that verifies a group of elements does not contain a given set of values failed. A group of elements can be a collection, an array or a String.
Authors
Alex Ruiz, Joel Costigliola

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldNotContain(Object actual, Object expected, Object found, ComparisonStrategy comparisonStrategy)

private
ShouldNotContain(Object actual, List<String> matchingContent, String filterDescription)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory
directoryShouldNotContain(File actual, List<File> matchingContent, String filterDescription)

public static ErrorMessageFactory
directoryShouldNotContain(Path actual, List<Path> matchingContent, String filterDescription)

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldNotContain
(Object
the actual value in the failed assertion.
actual
,
Object
values expected not to be contained in actual.
expected
,
Object
the values in expected found in actual.
found
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldNotContain.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldNotContain
(Object
the actual value in the failed assertion.
actual
,
Object
values expected not to be contained in actual.
expected
,
Object
the values in expected found in actual.
found
)

Creates a new ShouldNotContain.

private static List<String>
private static List<String>
Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Constructor Detail

ShouldNotContainback to summary
private ShouldNotContain(Object actual, Object expected, Object found, ComparisonStrategy comparisonStrategy)
ShouldNotContainback to summary
private ShouldNotContain(Object actual, List<String> matchingContent, String filterDescription)

Method Detail

directoryShouldNotContainback to summary
public static ErrorMessageFactory directoryShouldNotContain(File actual, List<File> matchingContent, String filterDescription)
directoryShouldNotContainback to summary
public static ErrorMessageFactory directoryShouldNotContain(Path actual, List<Path> matchingContent, String filterDescription)
shouldNotContainback to summary
public static ErrorMessageFactory shouldNotContain(Object actual, Object expected, Object found, ComparisonStrategy comparisonStrategy)

Creates a new ShouldNotContain.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

values expected not to be contained in actual.

found:Object

the values in expected found in actual.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldNotContainback to summary
public static ErrorMessageFactory shouldNotContain(Object actual, Object expected, Object found)

Creates a new ShouldNotContain.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

values expected not to be contained in actual.

found:Object

the values in expected found in actual.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

toFileNamesback to summary
private static List<String> toFileNames(List<File> files)
toPathNamesback to summary
private static List<String> toPathNames(List<Path> files)