public class CustomComparator extends DefaultComparator
| Constructor and Description |
|---|
CustomComparator(JSONCompareMode mode,
Customization... customizations) |
| Modifier and Type | Method and Description |
|---|---|
void |
compareValues(String prefix,
Object expectedValue,
Object actualValue,
JSONCompareResult result)
Compares two
Objects on the provided path represented by prefix and
updates the result of the comparison in the result JSONCompareResult object. |
areNotSameDoubles, areNumbers, compareJSON, compareJSONArraycheckJsonObjectKeysActualInExpected, checkJsonObjectKeysExpectedInActual, compareJSON, compareJSON, compareJSONArrayOfJsonObjects, compareJSONArrayOfSimpleValues, compareJSONArrayWithStrictOrder, recursivelyCompareJSONArraypublic CustomComparator(JSONCompareMode mode, Customization... customizations)
public void compareValues(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result) throws org.json.JSONException
JSONComparatorObjects on the provided path represented by prefix and
updates the result of the comparison in the result JSONCompareResult object.compareValues in interface JSONComparatorcompareValues in class DefaultComparatorprefix - the path in the json where the comparison happensexpectedValue - the expected valueactualValue - the actual valueresult - stores the actual state of the comparison resultorg.json.JSONException - JSON parsing errorCopyright © 2017. All Rights Reserved.