Package org.springframework.test.json
Class JsonComparison
java.lang.Object
org.springframework.test.json.JsonComparison
A comparison of two JSON strings as returned from a
JsonComparator
.- Since:
- 6.2
- Author:
- Phillip Webb
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn a message describing the comparison.Return the result of the comparison.static JsonComparison
match()
Factory method to create a newJsonComparison
when the JSON strings match.static JsonComparison
Factory method to create a newJsonComparison
when the JSON strings do not match.
-
Method Details
-
match
Factory method to create a newJsonComparison
when the JSON strings match.- Returns:
- a new
JsonComparison
instance
-
mismatch
Factory method to create a newJsonComparison
when the JSON strings do not match.- Parameters:
message
- a message describing the mismatch- Returns:
- a new
JsonComparison
instance
-
getResult
Return the result of the comparison. -
getMessage
Return a message describing the comparison.
-