Top Description Inners Fields Constructors Methods
org.assertj.core.api.recursive.assertion

public Class RecursiveAssertionConfiguration

extends AbstractRecursiveOperationConfiguration
Class Inheritance
Static Imports
java.lang.String.format, org.assertj.core.api.recursive.assertion.RecursiveAssertionConfiguration.CollectionAssertionPolicy.ELEMENTS_ONLY, .RecursiveAssertionConfiguration.MapAssertionPolicy.MAP_VALUES_ONLY, .RecursiveAssertionConfiguration.OptionalAssertionPolicy.OPTIONAL_VALUE_ONLY, org.assertj.core.configuration.ConfigurationProvider.CONFIGURATION_PROVIDER

Configuration for recursive assertions.
Since
3.24.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static enum
RecursiveAssertionConfiguration.CollectionAssertionPolicy

Possible policies to use regarding collections (including arrays) when recursively asserting over the fields of an object tree.

public static enum
RecursiveAssertionConfiguration.MapAssertionPolicy

Possible policies to use regarding maps when recursively asserting over the fields of an object tree.

public static enum
RecursiveAssertionConfiguration.OptionalAssertionPolicy

Possible policies to use regarding optionals when recursively asserting over the fields of an object tree.

Field Summary

Modifier and TypeField and Description
private RecursiveAssertionConfiguration.CollectionAssertionPolicy
private boolean
private boolean
private RecursiveAssertionIntrospectionStrategy
private RecursiveAssertionConfiguration.MapAssertionPolicy
private RecursiveAssertionConfiguration.OptionalAssertionPolicy
private final boolean
Inherited from org.assertj.core.api.recursive.AbstractRecursiveOperationConfiguration:
DEFAULT_DELIMITER

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static RecursiveAssertionConfiguration.Builder

Returns:

A Builder that will assist the developer in creating a valid instance of RecursiveAssertionConfiguration.
builder
()

private void
private void
private void
private void
private void
private void
private void
private void
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
pack-priv RecursiveAssertionConfiguration.CollectionAssertionPolicy
pack-priv RecursiveAssertionIntrospectionStrategy
pack-priv RecursiveAssertionConfiguration.MapAssertionPolicy
pack-priv RecursiveAssertionConfiguration.OptionalAssertionPolicy
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public void
ignoreAllNullFields(boolean
whether to ignore empty optional fields in the recursive comparison
ignoreAllNullFields
)

Makes the recursive assertion to ignore all null fields.

public void
ignoreFields(String...
the fields to ignore in the object under test.
fieldsToIgnore
)

Overrides org.assertj.core.api.recursive.AbstractRecursiveOperationConfiguration.ignoreFields.

Makes the recursive assertion to ignore the specified fields in the object under test.
public void
ignoreFieldsMatchingRegexes(String...
regexes used to ignore fields in the assertion.
regexes
)

Overrides org.assertj.core.api.recursive.AbstractRecursiveOperationConfiguration.ignoreFieldsMatchingRegexes.

Makes the recursive assertion to ignore the fields matching the specified regexes in the object under test.
public void
ignoreFieldsOfTypes(Class<?>...
the types we want to ignore in the object under test fields.
types
)

Overrides org.assertj.core.api.recursive.AbstractRecursiveOperationConfiguration.ignoreFieldsOfTypes.

Makes the recursive assertion to ignore the object under test fields of the given types.
public void
ignorePrimitiveFields(boolean ignorePrimitiveFields)

Choose between running the Predicate in use over the primitive fields of an object in an object tree or not, by default asserting over primitives is enabled.

public void
setCollectionAssertionPolicy(RecursiveAssertionConfiguration.CollectionAssertionPolicy collectionAssertionPolicy)

Makes the recursive assertion to use the specified CollectionAssertionPolicy.

public void
setIntrospectionStrategy(RecursiveAssertionIntrospectionStrategy introspectionStrategy)

Defines how objects are introspected in the recursive assertion.

public void
setMapAssertionPolicy(RecursiveAssertionConfiguration.MapAssertionPolicy
the MapAssertionPolicy to use.
mapAssertionPolicy
)

Makes the recursive assertion to use the specified MapAssertionPolicy.

public void
setOptionalAssertionPolicy(RecursiveAssertionConfiguration.OptionalAssertionPolicy optionalAssertionPolicy)

Makes the recursive assertion to use the specified OptionalAssertionPolicy.

pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
pack-priv boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.assertj.core.api.recursive.AbstractRecursiveOperationConfiguration:
asWrapperIfPrimitiveTypedescribeIgnoredFieldsdescribeIgnoredFieldsRegexesdescribeIgnoredTypesdescribeRegexesgetIgnoredFieldsgetIgnoredFieldsRegexesgetIgnoredTypesgetIgnoredTypesRegexesignoreFieldsOfTypesMatchingRegexesjoinmatchesAnIgnoredFieldmatchesAnIgnoredFieldRegex