Class CustomComparator
java.lang.Object
org.skyscreamer.jsonassert.comparator.AbstractComparator
org.skyscreamer.jsonassert.comparator.DefaultComparator
org.skyscreamer.jsonassert.comparator.CustomComparator
- All Implemented Interfaces:
JSONComparator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compareValues
(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result) Compares twoObject
s on the provided path represented byprefix
and updates the result of the comparison in theresult
JSONCompareResult
object.Methods inherited from class org.skyscreamer.jsonassert.comparator.DefaultComparator
areNotSameDoubles, areNumbers, compareJSON, compareJSONArray
Methods inherited from class org.skyscreamer.jsonassert.comparator.AbstractComparator
checkJsonObjectKeysActualInExpected, checkJsonObjectKeysExpectedInActual, compareJSON, compareJSON, compareJSONArrayOfJsonObjects, compareJSONArrayOfSimpleValues, compareJSONArrayWithStrictOrder, recursivelyCompareJSONArray
-
Constructor Details
-
CustomComparator
-
-
Method Details
-
compareValues
public void compareValues(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result) Description copied from interface:JSONComparator
Compares twoObject
s on the provided path represented byprefix
and updates the result of the comparison in theresult
JSONCompareResult
object.- Specified by:
compareValues
in interfaceJSONComparator
- Overrides:
compareValues
in classDefaultComparator
- Parameters:
prefix
- the path in the json where the comparison happensexpectedValue
- the expected valueactualValue
- the actual valueresult
- stores the actual state of the comparison result
-