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

public Class ShouldContainsOnlyOnce

extends BasicErrorMessageFactory
Class Inheritance
Static Imports
org.assertj.core.util.IterableUtil.isNullOrEmpty

Creates an error message indicating that an assertion that verifies a group of elements contains only a given set of values and nothing else failed. A group of elements can be a collection, an array or a String.
Author
William Delanoue

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldContainsOnlyOnce(Object actual, Object expected, Set<?> notFound, Set<?> notOnlyOnce, ComparisonStrategy comparisonStrategy)

private
ShouldContainsOnlyOnce(Object actual, Object expected, Set<?> notFound, ComparisonStrategy comparisonStrategy)

private
ShouldContainsOnlyOnce(Set<?> notOnlyOnce, Object actual, Object expected, ComparisonStrategy comparisonStrategy)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainsOnlyOnce
(Object
the actual value in the failed assertion.
actual
,
Object
values expected to be contained in actual.
expected
,
Set<?>
values in expected not found in actual.
notFound
,
Set<?>
values in actual that were not only once in expected.
notOnlyOnce
,
ComparisonStrategy
the ComparisonStrategy used to evaluate assertion.
comparisonStrategy
)

Creates a new ShouldContainsOnlyOnce.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainsOnlyOnce
(Object
the actual value in the failed assertion.
actual
,
Object
values expected to be contained in actual.
expected
,
Set<?>
values in expected not found in actual.
notFound
,
Set<?>
values in actual that were found not only once in expected.
notOnlyOnce
)

Creates a new ShouldContainsOnlyOnce.

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

Constructor Detail

ShouldContainsOnlyOnceback to summary
private ShouldContainsOnlyOnce(Object actual, Object expected, Set<?> notFound, Set<?> notOnlyOnce, ComparisonStrategy comparisonStrategy)
ShouldContainsOnlyOnceback to summary
private ShouldContainsOnlyOnce(Object actual, Object expected, Set<?> notFound, ComparisonStrategy comparisonStrategy)
ShouldContainsOnlyOnceback to summary
private ShouldContainsOnlyOnce(Set<?> notOnlyOnce, Object actual, Object expected, ComparisonStrategy comparisonStrategy)

Method Detail

shouldContainsOnlyOnceback to summary
public static ErrorMessageFactory shouldContainsOnlyOnce(Object actual, Object expected, Set<?> notFound, Set<?> notOnlyOnce, ComparisonStrategy comparisonStrategy)

Creates a new ShouldContainsOnlyOnce.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

values expected to be contained in actual.

notFound:Set<?>

values in expected not found in actual.

notOnlyOnce:Set<?>

values in actual that were not only once in expected.

comparisonStrategy:ComparisonStrategy

the ComparisonStrategy used to evaluate assertion.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainsOnlyOnceback to summary
public static ErrorMessageFactory shouldContainsOnlyOnce(Object actual, Object expected, Set<?> notFound, Set<?> notOnlyOnce)

Creates a new ShouldContainsOnlyOnce.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

values expected to be contained in actual.

notFound:Set<?>

values in expected not found in actual.

notOnlyOnce:Set<?>

values in actual that were found not only once in expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.