Interface WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>
- Type Parameters:
S- a self reference to the spec typeB- the body type
- All Known Subinterfaces:
WebTestClient.ListBodySpec<E>
- Enclosing interface:
- WebTestClient
public static interface WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>
Spec for expectations on the response body decoded to a single Object.
-
Method Summary
Modifier and TypeMethodDescription<T extends S>
TconsumeWith(Consumer<EntityExchangeResult<B>> consumer) Assert the exchange result with the givenConsumer.<T extends S>
TAssert the extracted body is equal to the given value.Exit the chained API and return anExchangeResultwith the decoded response content.<T extends S>
TAssert the extracted body with aConsumer.<T extends S,R>
TTransform the extracted the body with a function, e.g.<T extends S>
TAssert the extracted body with aMatcher.
-
Method Details
-
isEqualTo
Assert the extracted body is equal to the given value. -
value
Assert the extracted body with aMatcher.- Since:
- 5.1
-
value
Transform the extracted the body with a function, e.g. extracting a property, and assert the mapped value with aMatcher.- Since:
- 5.1
-
value
Assert the extracted body with aConsumer.- Since:
- 5.1
-
consumeWith
Assert the exchange result with the givenConsumer. -
returnResult
EntityExchangeResult<B> returnResult()Exit the chained API and return anExchangeResultwith the decoded response content.
-