| Modifier and Type | Class and Description |
|---|---|
| protected static class | AbstractRecursiveOperationConfiguration.
|
| Modifier and Type | Field and Description |
|---|---|
| protected static final String | |
| private final Set | |
| private final List | |
| private final Set | |
| private final List |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected static Class | |
| protected void | |
| private String | |
| protected void | |
| protected String | |
| protected String | |
| public Set | Returns: the set of fields from the object under test to ignore in the recursive comparison.Returns the set of fields from the object under test to ignore in the recursive comparison. |
| public List | |
| public Set | Returns: the set of fields from the object under test types to ignore in the recursive comparison.Returns the set of fields from the object under test types to ignore in the recursive comparison. |
| public List | Returns: the regexes that will be used to ignore fields with types matching these regexes in the recursive comparison.Returns the regexes that will be used to ignore fields with types matching these regexes in the recursive comparison. |
| public void | ignoreFields(String...
the fields of the object under test to ignore in the comparison. fieldsToIgnore)Adds the given fields to the set of fields from the object under test to ignore in the recursive comparison. |
| public void | ignoreFieldsMatchingRegexes(String...
regexes used to ignore fields in the comparison. regexes)Allows to ignore in the recursive comparison the object under test fields matching the given regexes. |
| public void | ignoreFieldsOfTypes(Class<?>...
the types of the object under test to ignore in the comparison. types)Makes the recursive assertion to ignore the object under test fields of the given types. |
| public void | ignoreFieldsOfTypesMatchingRegexes(String...
regexes specifying the types to ignore. regexes)Makes the recursive comparison to ignore the fields of the object under test having types matching one of the given regexes. |
| protected static String | |
| public boolean | |
| public boolean | |
| private static List |
| DEFAULT_DELIMITER | back to summary |
|---|---|
| protected static final String DEFAULT_DELIMITER | |
| ignoredFields | back to summary |
|---|---|
| private final Set<String> ignoredFields | |
| ignoredFieldsRegexes | back to summary |
|---|---|
| private final List<Pattern> ignoredFieldsRegexes | |
| ignoredTypes | back to summary |
|---|---|
| private final Set<Class<?>> ignoredTypes | |
| ignoredTypesRegexes | back to summary |
|---|---|
| private final List<Pattern> ignoredTypesRegexes | |
| AbstractRecursiveOperationConfiguration | back to summary |
|---|---|
| protected AbstractRecursiveOperationConfiguration(AbstractRecursiveOperationConfiguration. | |
| AbstractRecursiveOperationConfiguration | back to summary |
|---|---|
| protected AbstractRecursiveOperationConfiguration() | |
| asWrapperIfPrimitiveType | back to summary |
|---|---|
| protected static Class | |
| describeIgnoredFields | back to summary |
|---|---|
| protected void describeIgnoredFields(StringBuilder description) | |
| describeIgnoredFields | back to summary |
|---|---|
| private String describeIgnoredFields() | |
| describeIgnoredFieldsRegexes | back to summary |
|---|---|
| protected void describeIgnoredFieldsRegexes(StringBuilder description) | |
| describeIgnoredTypes | back to summary |
|---|---|
| protected String describeIgnoredTypes() | |
| describeRegexes | back to summary |
|---|---|
| protected String describeRegexes(List<Pattern> regexes) | |
| getIgnoredFields | back to summary |
|---|---|
| public Set Returns the set of fields from the object under test to ignore in the recursive comparison. | |
| getIgnoredFieldsRegexes | back to summary |
|---|---|
| public List | |
| getIgnoredTypes | back to summary |
|---|---|
| public Set Returns the set of fields from the object under test types to ignore in the recursive comparison. | |
| getIgnoredTypesRegexes | back to summary |
|---|---|
| public List Returns the regexes that will be used to ignore fields with types matching these regexes in the recursive comparison. | |
| ignoreFields | back to summary |
|---|---|
| public void ignoreFields(String... fieldsToIgnore) Adds the given fields to the set of fields from the object under test to ignore in the recursive comparison. The fields are ignored by name, not by value.
See
| |
| ignoreFieldsMatchingRegexes | back to summary |
|---|---|
| public void ignoreFieldsMatchingRegexes(String... regexes) Allows to ignore in the recursive comparison the object under test fields matching the given regexes. The given regexes are added to the already registered ones.
See
| |
| ignoreFieldsOfTypes | back to summary |
|---|---|
| public void ignoreFieldsOfTypes(Class<?>... types) Makes the recursive assertion to ignore the object under test fields of the given types. The fields are ignored if their types exactly match one of the ignored types, for example if a field is a subtype of an ignored type it is not ignored. If some object under test fields are null it is not possible to evaluate their types and thus these fields are not ignored.
Example: see
| |
| ignoreFieldsOfTypesMatchingRegexes | back to summary |
|---|---|
| public void ignoreFieldsOfTypesMatchingRegexes(String... regexes) Makes the recursive comparison to ignore the fields of the object under test having types matching one of the given regexes. The fields are ignored if their types exactly match one of the regexes, if a field is a subtype of a matched type it is not ignored. One use case of this method is to ignore types that can't be introspected.
If Warning primitive types are not directly supported because under the hood they are converted to their
corresponding wrapping types, for example
Example: see
| |
| join | back to summary |
|---|---|
| protected static String join(Collection<String> typesDescription) | |
| matchesAnIgnoredField | back to summary |
|---|---|
| public boolean matchesAnIgnoredField(FieldLocation fieldLocation) | |
| matchesAnIgnoredFieldRegex | back to summary |
|---|---|
| public boolean matchesAnIgnoredFieldRegex(FieldLocation fieldLocation) | |
| toPatterns | back to summary |
|---|---|
| private static List | |
| Modifier and Type | Field and Description |
|---|---|
| private String[] | |
| private String[] | |
| private Class | |
| private final BUILDER_TYPE |
| Access | Constructor and Description |
|---|---|
| protected | AbstractBuilder(Class<? extends AbstractRecursiveOperationConfiguration.
|
| Modifier and Type | Method and Description |
|---|---|
| public BUILDER_TYPE | Returns: this builder.the fields of the object under test to ignore in the comparison. fieldsToIgnore)Adds the given fields to the set of fields from the object under test to ignore in the recursive comparison. |
| public BUILDER_TYPE | Returns: this builder.regexes used to ignore fields in the comparison. regexes)Allows to ignore in the recursive comparison the object under test fields matching the given regexes. |
| public BUILDER_TYPE | Returns: this builder.the types of the object under test to ignore in the comparison. types)Adds the given types to the list fields from the object under test types to ignore in the recursive comparison. |
| ignoredFields | back to summary |
|---|---|
| private String[] ignoredFields | |
| ignoredFieldsMatchingRegexes | back to summary |
|---|---|
| private String[] ignoredFieldsMatchingRegexes | |
| ignoredTypes | back to summary |
|---|---|
| private Class<?>[] ignoredTypes | |
| thisBuilder | back to summary |
|---|---|
| private final BUILDER_TYPE thisBuilder | |
| AbstractBuilder | back to summary |
|---|---|
protected AbstractBuilder(Class<? extends AbstractRecursiveOperationConfiguration.
| |
| withIgnoredFields | back to summary |
|---|---|
| public BUILDER_TYPE withIgnoredFields(String... fieldsToIgnore) Adds the given fields to the set of fields from the object under test to ignore in the recursive comparison. Nested fields can be specified like this: home.address.street.
See
| |
| withIgnoredFieldsMatchingRegexes | back to summary |
|---|---|
| public BUILDER_TYPE withIgnoredFieldsMatchingRegexes(String... regexes) Allows to ignore in the recursive comparison the object under test fields matching the given regexes. The given regexes are added to the already registered ones.
See
| |
| withIgnoredFieldsOfTypes | back to summary |
|---|---|
| public BUILDER_TYPE withIgnoredFieldsOfTypes(Class<?>... types) Adds the given types to the list fields from the object under test types to ignore in the recursive comparison. The fields are ignored if their types exactly match one of the ignored types, if a field is a subtype of an ignored type it won't be ignored. Note that if some object under test fields are null, they are not ignored by this method as their type can't be evaluated.
See
| |