public abstract class AbstractComparator extends Object implements JSONComparator
JSONComparator
interface, to minimize the effort required to implement this interface.| Constructor and Description |
|---|
AbstractComparator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkJsonObjectKeysActualInExpected(String prefix,
org.json.JSONObject expected,
org.json.JSONObject actual,
JSONCompareResult result) |
protected void |
checkJsonObjectKeysExpectedInActual(String prefix,
org.json.JSONObject expected,
org.json.JSONObject actual,
JSONCompareResult result) |
JSONCompareResult |
compareJSON(org.json.JSONArray expected,
org.json.JSONArray actual)
Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison.
|
JSONCompareResult |
compareJSON(org.json.JSONObject expected,
org.json.JSONObject actual)
Compares JSONObject provided to the expected JSONObject, and returns the results of the comparison.
|
protected void |
compareJSONArrayOfJsonObjects(String key,
org.json.JSONArray expected,
org.json.JSONArray actual,
JSONCompareResult result) |
protected void |
compareJSONArrayOfSimpleValues(String key,
org.json.JSONArray expected,
org.json.JSONArray actual,
JSONCompareResult result) |
protected void |
compareJSONArrayWithStrictOrder(String key,
org.json.JSONArray expected,
org.json.JSONArray actual,
JSONCompareResult result) |
protected void |
recursivelyCompareJSONArray(String key,
org.json.JSONArray expected,
org.json.JSONArray actual,
JSONCompareResult result) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompareJSON, compareJSONArray, compareValuespublic final JSONCompareResult compareJSON(org.json.JSONObject expected, org.json.JSONObject actual) throws org.json.JSONException
compareJSON in interface JSONComparatorexpected - Expected JSONObjectactual - JSONObject to compareorg.json.JSONException - JSON parsing errorpublic final JSONCompareResult compareJSON(org.json.JSONArray expected, org.json.JSONArray actual) throws org.json.JSONException
compareJSON in interface JSONComparatorexpected - Expected JSONArrayactual - JSONArray to compareorg.json.JSONException - JSON parsing errorprotected void checkJsonObjectKeysActualInExpected(String prefix, org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareResult result)
protected void checkJsonObjectKeysExpectedInActual(String prefix, org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONExceptionprotected void compareJSONArrayOfJsonObjects(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONExceptionprotected void compareJSONArrayOfSimpleValues(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONExceptionprotected void compareJSONArrayWithStrictOrder(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONExceptionprotected void recursivelyCompareJSONArray(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONExceptionCopyright © 2017. All Rights Reserved.