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 (for example, isEmpty, JSONPath, etc.).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).Deprecated.WebTestClient.BodyContentSpec.json
(String expectedJson, JsonComparator comparator) Parse the expected and actual response content as JSON and perform a comparison using the givenJsonComparator
.WebTestClient.BodyContentSpec.json
(String expectedJson, JsonCompareMode compareMode) Parse the expected and actual response content as JSON and perform a comparison using the given mode.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 and provide a target class.Consume the result of the JSONPath evaluation.Deprecated, for removal: This API element is subject to removal in a future version.in favor ofJsonPathAssertions.value(Class, Consumer)
Delegates toJsonPathExpectationsHelper.assertValue(String, Matcher)
.Deprecated, for removal: This API element is subject to removal in a future version.in favor ofJsonPathAssertions.value(Class, Matcher)
JsonPathAssertions.value
(ParameterizedTypeReference<T> targetType, Consumer<T> consumer) Consume the result of the JSONPath evaluation and provide a parameterized type.JsonPathAssertions.value
(ParameterizedTypeReference<T> targetType, Matcher<? super T> matcher) Parse expected and actual response content as XML and assert that the two are "similar", i.e.
json(String, JsonCompareMode)