Uses of Interface
org.springframework.test.web.reactive.server.WebTestClient.BodyContentSpec
Packages that use WebTestClient.BodyContentSpec
-
Uses of WebTestClient.BodyContentSpec in org.springframework.test.web.reactive.server
Methods in org.springframework.test.web.reactive.server that return WebTestClient.BodyContentSpecModifier and TypeMethodDescriptionWebTestClient.BodyContentSpec.consumeWith
(Consumer<EntityExchangeResult<byte[]>> consumer) Assert the response body content with the givenConsumer
.JsonPathAssertions.doesNotExist()
XpathAssertions.doesNotExist()
Delegates toXpathExpectationsHelper.doesNotExist(byte[], String)
.JsonPathAssertions.doesNotHaveJsonPath()
JsonPathAssertions.exists()
XpathAssertions.exists()
Delegates toXpathExpectationsHelper.exists(byte[], String)
.WebTestClient.ResponseSpec.expectBody()
Consume and decode the response body tobyte[]
and then apply assertions on the raw content (e.g.JsonPathAssertions.hasJsonPath()
JsonPathAssertions.isArray()
JsonPathAssertions.isBoolean()
JsonPathAssertions.isEmpty()
XpathAssertions.isEqualTo
(boolean expectedValue) JsonPathAssertions.isMap()
JsonPathAssertions.isNotEmpty()
JsonPathAssertions.isNumber()
default WebTestClient.BodyContentSpec
Parse 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).Parse the expected and actual response content as JSON and perform a comparison verifying that they contain the same attribute-value pairs regardless of formatting.XpathAssertions.nodeCount
(int expectedCount) Consume the count of nodes as result of the XPath evaluation.Consume the result of the XPath evaluation as a Double.Consume the result of the XPath evaluation as a String.Consume the result of the JSONPath evaluation.Consume the result of the JSONPath evaluation and provide a target class.Delegates toJsonPathExpectationsHelper.assertValue(String, Matcher)
.Parse expected and actual response content as XML and assert that the two are "similar", i.e.