public static interface WebTestClient.ResponseSpec
| Modifier and Type | Method and Description |
|---|---|
WebTestClient.BodyContentSpec |
expectBody()
Declare expectations on the response body content.
|
<B> WebTestClient.BodySpec<B,?> |
expectBody(Class<B> bodyType)
Declare expectations on the response body decoded to
<B>. |
<B> WebTestClient.BodySpec<B,?> |
expectBody(ParameterizedTypeReference<B> bodyType)
Variant of
expectBody(Class) for a body type with generics. |
<E> WebTestClient.ListBodySpec<E> |
expectBodyList(Class<E> elementType)
Declare expectations on the response body decoded to
List<E>. |
<E> WebTestClient.ListBodySpec<E> |
expectBodyList(ParameterizedTypeReference<E> elementType)
Variant of
expectBodyList(Class) for element types with generics. |
HeaderAssertions |
expectHeader()
Declared expectations on the headers of the response.
|
StatusAssertions |
expectStatus()
Declare expectations on the response status.
|
FluxExchangeResult<DataBuffer> |
returnResult()
Return the exchange result with the body decoded to
Flux<DataBuffer>. |
<T> FluxExchangeResult<T> |
returnResult(Class<T> elementType)
Return the exchange result with the body decoded to
Flux<T>. |
<T> FluxExchangeResult<T> |
returnResult(ParameterizedTypeReference<T> elementType)
Variant of
returnResult(Class) for element types with generics. |
StatusAssertions expectStatus()
HeaderAssertions expectHeader()
<B> WebTestClient.BodySpec<B,?> expectBody(Class<B> bodyType)
<B>.bodyType - the expected body type<B> WebTestClient.BodySpec<B,?> expectBody(ParameterizedTypeReference<B> bodyType)
expectBody(Class) for a body type with generics.<E> WebTestClient.ListBodySpec<E> expectBodyList(Class<E> elementType)
List<E>.elementType - the expected List element type<E> WebTestClient.ListBodySpec<E> expectBodyList(ParameterizedTypeReference<E> elementType)
expectBodyList(Class) for element types with generics.WebTestClient.BodyContentSpec expectBody()
<T> FluxExchangeResult<T> returnResult(Class<T> elementType)
Flux<T>.
Use this option for infinite streams and consume the stream with
the StepVerifier from the Reactor Add-Ons.<T> FluxExchangeResult<T> returnResult(ParameterizedTypeReference<T> elementType)
returnResult(Class) for element types with generics.FluxExchangeResult<DataBuffer> returnResult()
Flux<DataBuffer>. Use this option for infinite streams and
consume the stream with the StepVerifier from the Reactor Add-Ons.