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

public Class ShouldHaveFields

extends BasicErrorMessageFactory
Class Inheritance
Imports
java.util.Set

Creates an error message indicating that an assertion that verifies that a class have field.
Authors
William Delanoue, Joel Costigliola

Field Summary

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

Constructor Summary

AccessConstructor and Description
private
ShouldHaveFields(Class<?> actual, Set<String> expected, Set<String> missing, boolean declared)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveDeclaredFields
(Class<?>
the actual value in the failed assertion.
actual
,
Set<String>
expected fields for this class
expected
,
Set<String>
missing fields for this class
missing
)

Creates a new org.assertj.core.error.ShouldHaveFields.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHaveFields
(Class<?>
the actual value in the failed assertion.
actual
,
Set<String>
expected fields for this class
expected
,
Set<String>
missing fields for this class
missing
)

Creates a new org.assertj.core.error.ShouldHaveFields.

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

Constructor Detail

ShouldHaveFieldsback to summary
private ShouldHaveFields(Class<?> actual, Set<String> expected, Set<String> missing, boolean declared)

Method Detail

shouldHaveDeclaredFieldsback to summary
public static ErrorMessageFactory shouldHaveDeclaredFields(Class<?> actual, Set<String> expected, Set<String> missing)

Creates a new org.assertj.core.error.ShouldHaveFields.

Parameters
actual:Class<?>

the actual value in the failed assertion.

expected:Set<String>

expected fields for this class

missing:Set<String>

missing fields for this class

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHaveFieldsback to summary
public static ErrorMessageFactory shouldHaveFields(Class<?> actual, Set<String> expected, Set<String> missing)

Creates a new org.assertj.core.error.ShouldHaveFields.

Parameters
actual:Class<?>

the actual value in the failed assertion.

expected:Set<String>

expected fields for this class

missing:Set<String>

missing fields for this class

Returns:ErrorMessageFactory

the created ErrorMessageFactory.