Uses of Interface
org.springframework.test.json.JsonComparator
Package
Description
Testing support for JSON.
Contains built-in
RequestMatcher
implementations.Support for testing Spring WebFlux server endpoints via
WebTestClient
.Contains built-in
ResultMatcher
and ResultHandler
implementations.-
Uses of JsonComparator in org.springframework.test.json
Modifier and TypeMethodDescriptionstatic JsonComparator
JsonAssert.comparator
(org.skyscreamer.jsonassert.comparator.JSONComparator comparator) Create a newJsonComparator
from the given JSONAssertJSONComparator
.static JsonComparator
JsonAssert.comparator
(org.skyscreamer.jsonassert.JSONCompareMode mode) Create a newJsonComparator
from the given JSONAssertJSONCompareMode
.static JsonComparator
JsonAssert.comparator
(JsonCompareMode compareMode) Create aJsonComparator
from the givenJsonCompareMode
.Modifier and TypeMethodDescriptionAbstractJsonContentAssert.isEqualTo
(CharSequence expected, JsonComparator comparator) Verify that the actual value is equal to the given JSON.AbstractJsonContentAssert.isEqualTo
(Resource expected, JsonComparator comparator) Verify that the actual value is equal to the given JSONResource
.AbstractJsonContentAssert.isNotEqualTo
(CharSequence expected, JsonComparator comparator) Verify that the actual value is not equal to the given JSON.AbstractJsonContentAssert.isNotEqualTo
(Resource expected, JsonComparator comparator) Verify that the actual value is not equal to the given JSONResource
. -
Uses of JsonComparator in org.springframework.test.web.client.match
Modifier and TypeMethodDescriptionContentRequestMatchers.json
(String expectedJsonContent, JsonComparator comparator) Parse the request body and the given string as JSON and assert the two using the givenJsonComparator
. -
Uses of JsonComparator in org.springframework.test.web.reactive.server
Modifier and TypeMethodDescriptionWebTestClient.BodyContentSpec.json
(String expectedJson, JsonComparator comparator) Parse the expected and actual response content as JSON and perform a comparison using the givenJsonComparator
. -
Uses of JsonComparator in org.springframework.test.web.servlet.result
Modifier and TypeMethodDescriptionContentResultMatchers.json
(String jsonContent, JsonComparator comparator) Parse the response content and the given string as JSON and assert the two using the givenJsonComparator
.