Interface WebTestClient.BodySpec<B, S extends WebTestClient.BodySpec<B,S>>
- Type Parameters:
B- the body typeS- a self reference to the spec 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.
- Since:
- 5.0
- Author:
- Rossen Stoyanchev, Brian Clozel, Sam Brannen, MichaĆ Rowicki
-
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, R>
TTransform the extracted the body with a function, for example, extracting a property, and assert the mapped value with aMatcher.<T extends S>
TAssert the extracted body with aConsumer.<T extends S>
TAssert the extracted body with aMatcher.
-
Method Details
-
isEqualTo
-
value
Assert the extracted body with aMatcher.- Since:
- 5.1
-
value
-
value
-
consumeWith
Assert the exchange result with the givenConsumer. -
returnResult
EntityExchangeResult<B> returnResult()Exit the chained API and return anExchangeResultwith the decoded response content.
-