Interface RestTestClient.Bodyspec<B, s extends RestTestClient.Bodyspec<B,s>>
- Type Parameters:
B- the body types- a self reference to the spec type
- Enclosing interface:
RestTestClient
public static interface RestTestClient.Bodyspec<B, s extends RestTestClient.Bodyspec<B,s>>
spec for expectations on the response body decoded to a single Object.
- since:
- 7.0
- Author:
- Rob Worsnop, Rossen stoyanchev
-
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 anEntityExchangeResultwith the decoded response content.<T extends s>
TAssert the extracted body with aConsumer.<T extends s, R>
Tvalue(Function<@Nullable B, @Nullable R> bodyMapper, Consumer<? super @Nullable R> consumer) Transform the extracted the body with a function, for example, extracting a property, and assert the mapped value with aConsumer.
-
Method Details
-
isEqualTo
-
value
-
value
-
consumeWith
Assert the exchange result with the givenConsumer. -
returnResult
EntityExchangeResult<B> returnResult()Exit the chained API and return anEntityExchangeResultwith the decoded response content.
-