Uses of Class
org.skyscreamer.jsonassert.JSONCompareResult
-
Uses of JSONCompareResult in org.skyscreamer.jsonassert
Modifier and TypeMethodDescriptionstatic JSONCompareResult
JSONCompare.compareJson
(org.json.JSONString expected, org.json.JSONString actual) ComparesJSONString
provided to the expectedJSONString
, checking that theJSONString.toJSONString()
are equal.static JSONCompareResult
JSONCompare.compareJSON
(String expectedStr, String actualStr, JSONComparator comparator) Compares JSON string provided to the expected JSON string using provided comparator, and returns the results of the comparison.static JSONCompareResult
JSONCompare.compareJSON
(String expectedStr, String actualStr, JSONCompareMode mode) Compares JSON string provided to the expected JSON string, and returns the results of the comparison.static JSONCompareResult
JSONCompare.compareJSON
(org.json.JSONArray expected, org.json.JSONArray actual, JSONComparator comparator) Compares JSON object provided to the expected JSON object using provided comparator, and returns the results of the comparison.static JSONCompareResult
JSONCompare.compareJSON
(org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareMode mode) Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison.static JSONCompareResult
JSONCompare.compareJSON
(org.json.JSONObject expected, org.json.JSONObject actual, JSONComparator comparator) Compares JSON object provided to the expected JSON object using provided comparator, and returns the results of the comparison.static JSONCompareResult
JSONCompare.compareJSON
(org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareMode mode) Compares JSONObject provided to the expected JSONObject, and returns the results of the comparison.Identify that the comparison failedJSONCompareResult.fail
(String field, ValueMatcherException exception) Identify that the comparison failedIdentify the missing fieldJSONCompareResult.unexpected
(String field, Object actual) Identify unexpected fieldModifier and TypeMethodDescriptionboolean
ArrayValueMatcher.equal
(String prefix, T actual, T expected, JSONCompareResult result) boolean
LocationAwareValueMatcher.equal
(String prefix, T actual, T expected, JSONCompareResult result) Match actual value with expected value.boolean
Customization.matches
(String prefix, Object actual, Object expected, JSONCompareResult result) Return true if actual value matches expected value using this Customization's comparator. -
Uses of JSONCompareResult in org.skyscreamer.jsonassert.comparator
Modifier and TypeMethodDescriptionfinal JSONCompareResult
AbstractComparator.compareJSON
(org.json.JSONArray expected, org.json.JSONArray actual) Compares JSONArray provided to the expected JSONArray, and returns the results of the comparison.final JSONCompareResult
AbstractComparator.compareJSON
(org.json.JSONObject expected, org.json.JSONObject actual) Compares JSONObject provided to the expected JSONObject, and returns the results of the comparison.JSONComparator.compareJSON
(org.json.JSONArray expected, org.json.JSONArray actual) Compares twoJSONArray
s and returns the result of the comparison in aJSONCompareResult
object.JSONComparator.compareJSON
(org.json.JSONObject expected, org.json.JSONObject actual) Compares twoJSONObject
s and returns the result of the comparison in aJSONCompareResult
object.Modifier and TypeMethodDescriptionprotected void
AbstractComparator.checkJsonObjectKeysActualInExpected
(String prefix, org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareResult result) protected void
AbstractComparator.checkJsonObjectKeysExpectedInActual
(String prefix, org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareResult result) void
DefaultComparator.compareJSON
(String prefix, org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareResult result) void
JSONComparator.compareJSON
(String prefix, org.json.JSONObject expected, org.json.JSONObject actual, JSONCompareResult result) Compares twoJSONObject
s on the provided path represented byprefix
and updates the result of the comparison in theresult
JSONCompareResult
object.void
ArraySizeComparator.compareJSONArray
(String prefix, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) Expected array should consist of either 1 or 2 integer values that define maximum and minimum valid lengths of the actual array.void
DefaultComparator.compareJSONArray
(String prefix, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) void
JSONComparator.compareJSONArray
(String prefix, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) Compares twoJSONArray
s on the provided path represented byprefix
and updates the result of the comparison in theresult
JSONCompareResult
object.protected void
AbstractComparator.compareJSONArrayOfJsonObjects
(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) protected void
AbstractComparator.compareJSONArrayOfSimpleValues
(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) protected void
AbstractComparator.compareJSONArrayWithStrictOrder
(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result) void
CustomComparator.compareValues
(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result) void
DefaultComparator.compareValues
(String prefix, Object expectedValue, Object actualValue, JSONCompareResult result) void
JSONComparator.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.protected void
AbstractComparator.recursivelyCompareJSONArray
(String key, org.json.JSONArray expected, org.json.JSONArray actual, JSONCompareResult result)