Uses of Interface
org.springframework.test.web.servlet.client.RestTestClient.BodyContentSpec
Packages that use RestTestClient.BodyContentSpec
Package
Description
Support for testing Spring MVC applications via
RestTestClient with
MockMvc for server request handling.-
Uses of RestTestClient.BodyContentSpec in org.springframework.test.web.servlet.client
Subclasses with type arguments of type RestTestClient.BodyContentSpec in org.springframework.test.web.servlet.clientModifier and TypeClassDescriptionclassJsonPath assertions.classXPath assertions for theRestTestClient.Methods in org.springframework.test.web.servlet.client that return RestTestClient.BodyContentSpecModifier and TypeMethodDescriptionRestTestClient.BodyContentSpec.consumeWith(Consumer<EntityExchangeResult<byte[]>> consumer) Assert the response body content with the givenConsumer.RestTestClient.ResponseSpec.expectBody()Consume and decode the response body tobyte[]and then apply assertions on the raw content (for example, isEmpty, JSONPath, etc.).default RestTestClient.BodyContentSpecParse the expected and actual response content as JSON and perform a comparison verifying that they contain the same attribute-value pairs regardless of formatting with lenient checking (extensible and non-strict array ordering).RestTestClient.BodyContentSpec.json(String expectedJson, JsonComparator comparator) Parse the expected and actual response content as JSON and perform a comparison using the givenJsonComparator.RestTestClient.BodyContentSpec.json(String expectedJson, JsonCompareMode compareMode) Parse the expected and actual response content as JSON and perform a comparison using the given mode.Parse expected and actual response content as XML and assert that the two are "similar", i.e.