Uses of Interface
org.springframework.test.json.JsonComparator
Packages that use 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
Methods in org.springframework.test.json that return JsonComparatorModifier 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
.Methods in org.springframework.test.json with parameters of type JsonComparatorModifier 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
Methods in org.springframework.test.web.client.match with parameters of type JsonComparatorModifier 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
Methods in org.springframework.test.web.reactive.server with parameters of type JsonComparatorModifier 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
Methods in org.springframework.test.web.servlet.result with parameters of type JsonComparatorModifier and TypeMethodDescriptionContentResultMatchers.json
(String jsonContent, JsonComparator comparator) Parse the response content and the given string as JSON and assert the two using the givenJsonComparator
.