Support for testing Spring WebFlux server endpoints via
WebTestClient
.
-
Assert the response body content with the given
Consumer
.
Consume and decode the response body to byte[]
and then apply
assertions on the raw content (e.g.
XpathAssertions.isEqualTo(boolean expectedValue)
JsonPathAssertions.isMap()
WebTestClient.BodyContentSpec.json(String expectedJson)
Parse the expected and actual response content as JSON and perform a
"lenient" comparison verifying the same attribute-value pairs.
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.
WebTestClient.BodyContentSpec.xml(String expectedXml)
Parse expected and actual response content as XML and assert that
the two are "similar", i.e.