T - type of object been compared.public final class DiffObjects<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
List<DiffResult> |
diff(Collection<T> expected,
Collection<T> current,
DiffComparator<T> matcher)
Execute the diff between two objects using annotations.
|
List<DiffResult> |
diff(Collection<T> expectedCollection,
Collection<T> currentCollection,
DiffConfiguration configuration,
DiffComparator<T> matcher)
Execute the diff between two objects using a configuration.
|
List<DiffResult> |
diff(T expected,
T current)
Execute the diff between two objects using annotations.
|
List<DiffResult> |
diff(T expected,
T current,
DiffConfiguration configuration)
Execute the diff between two objects using a configuration.
|
static <T> DiffObjects<T> |
forClass(Class<T> clazz)
Creates a DiffObjects for a specific class.
|
boolean |
isEquals(Collection<T> expectedCollection,
Collection<T> currentCollection,
DiffComparator<T> matcher)
Check if exists any difference between the two objects using annotations.
|
boolean |
isEquals(Collection<T> expectedCollection,
Collection<T> currentCollection,
DiffConfiguration configuration,
DiffComparator<T> matcher)
Check if exists any difference between the two objects.
|
boolean |
isEquals(T expected,
T current)
Check if exists any difference between the two objects using annotations.
|
boolean |
isEquals(T expected,
T current,
DiffConfiguration configuration)
Check if exists any difference between the two objects.
|
public static <T> DiffObjects<T> forClass(Class<T> clazz)
T - type of the class.clazz - class type of this DiffObjects.public List<DiffResult> diff(T expected, T current)
expected - the expected object state to compare with current object.current - the current object state to compare with expected object.public List<DiffResult> diff(T expected, T current, DiffConfiguration configuration)
expected - the expected object state to compare with after object.current - the current object state to compare with before object.configuration - the configuration of the diff.public List<DiffResult> diff(Collection<T> expected, Collection<T> current, DiffComparator<T> matcher)
expected - the expected object state to compare with after object.current - the current object state to compare with before object.matcher - the matcher that will define how an object from list is equals to other.public List<DiffResult> diff(Collection<T> expectedCollection, Collection<T> currentCollection, DiffConfiguration configuration, DiffComparator<T> matcher)
expectedCollection - the expected object state to compare with after object.currentCollection - the current object state to compare with before object.configuration - the configuration of the diff.matcher - the matcher that will define how an object from list is equals to other.public boolean isEquals(T expected, T current)
expected - the expected object state to compare with after object.current - the current object state to compare with before object.true if no difference exists between the objects or false otherwise.public boolean isEquals(T expected, T current, DiffConfiguration configuration)
expected - the expected object state to compare with after object.current - the current object state to compare with before object.configuration - the configuration of the diff.true if no difference exists between the objects or false otherwise.public boolean isEquals(Collection<T> expectedCollection, Collection<T> currentCollection, DiffComparator<T> matcher)
expectedCollection - the expected object state to compare with after object.currentCollection - the current object state to compare with before object.matcher - the matcher that will define how an object from list is equals to other.true if no difference exists between the objects or false otherwise.public boolean isEquals(Collection<T> expectedCollection, Collection<T> currentCollection, DiffConfiguration configuration, DiffComparator<T> matcher)
expectedCollection - the expected object state to compare with after object.currentCollection - the current object state to compare with before object.configuration - the configuration of the diff.matcher - the matcher that will define how an object from list is equals to other.true if no difference exists between the objects or false otherwise.Copyright © 2020. All rights reserved.