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

public Class ShouldContainOnlyKeys

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

Creates an error message indicating that an assertion that verifies map contains only a given set of keys and nothing else failed.
Author
Joel Costigliola

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldContainOnlyKeys(Object actual, Object expected, Object notFound, Object notExpected, ComparisonStrategy comparisonStrategy)

private
ShouldContainOnlyKeys(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainOnlyKeys
(Object
the actual value in the failed assertion.
actual
,
Object
values expected to be contained in actual.
expected
,
Object
values in expected not found in actual.
notFound
,
Object
values in actual that were not in expected.
notExpected
)

Creates a new ShouldContainOnlyKeys.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldContainOnlyKeys
(Object
the actual value in the failed assertion.
actual
,
Object
values expected to be contained in actual.
expected
,
Object
values in expected not found in actual.
notFound
,
Iterable<?>
values in actual that were not in expected.
notExpected
)

Creates a new ShouldContainOnlyKeys.

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

Constructor Detail

ShouldContainOnlyKeysback to summary
private ShouldContainOnlyKeys(Object actual, Object expected, Object notFound, Object notExpected, ComparisonStrategy comparisonStrategy)
ShouldContainOnlyKeysback to summary
private ShouldContainOnlyKeys(Object actual, Object expected, Object notFound, ComparisonStrategy comparisonStrategy)

Method Detail

shouldContainOnlyKeysback to summary
public static ErrorMessageFactory shouldContainOnlyKeys(Object actual, Object expected, Object notFound, Object notExpected)

Creates a new ShouldContainOnlyKeys.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

values expected to be contained in actual.

notFound:Object

values in expected not found in actual.

notExpected:Object

values in actual that were not in expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldContainOnlyKeysback to summary
public static ErrorMessageFactory shouldContainOnlyKeys(Object actual, Object expected, Object notFound, Iterable<?> notExpected)

Creates a new ShouldContainOnlyKeys.

Parameters
actual:Object

the actual value in the failed assertion.

expected:Object

values expected to be contained in actual.

notFound:Object

values in expected not found in actual.

notExpected:Iterable<?>

values in actual that were not in expected.

Returns:ErrorMessageFactory

the created ErrorMessageFactory.