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, wait
compareJSON, compareJSONArray, compareValues
public final JSONCompareResult compareJSON(org.json.JSONObject expected, org.json.JSONObject actual) throws org.json.JSONException
compareJSON
in interface JSONComparator
expected
- Expected JSONObjectactual
- JSONObject to compareorg.json.JSONException
public final JSONCompareResult compareJSON(org.json.JSONArray expected, org.json.JSONArray actual) throws org.json.JSONException
compareJSON
in interface JSONComparator
expected
- Expected JSONArrayactual
- JSONArray to compareorg.json.JSONException
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) throws org.json.JSONException
org.json.JSONException
protected void compareJSONArrayOfJsonObjects(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONException
protected void compareJSONArrayOfSimpleValues(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONException
protected void compareJSONArrayWithStrictOrder(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONException
protected void recursivelyCompareJSONArray(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) throws org.json.JSONException
org.json.JSONException
Copyright © 2018. All rights reserved.