private static class DefaultWebTestClient.DefaultBodySpec<B,S extends WebTestClient.BodySpec<B,S>> extends java.lang.Object implements WebTestClient.BodySpec<B,S>
Modifier and Type | Field and Description |
---|---|
private EntityExchangeResult<B> |
result |
Constructor and Description |
---|
DefaultBodySpec(EntityExchangeResult<B> result) |
Modifier and Type | Method and Description |
---|---|
<T extends S> |
consumeWith(java.util.function.Consumer<EntityExchangeResult<B>> consumer)
Assert the exchange result with the given
Consumer . |
protected EntityExchangeResult<B> |
getResult() |
<T extends S> |
isEqualTo(B expected)
Assert the extracted body is equal to the given value.
|
EntityExchangeResult<B> |
returnResult()
Exit the chained API and return an
ExchangeResult with the
decoded response content. |
private <T extends S> |
self() |
<T extends S> |
value(<any> matcher)
Assert the extracted body with a
Matcher . |
<T extends S,R> |
value(java.util.function.Function<B,R> bodyMapper,
<any> matcher)
Transform the extracted the body with a function, e.g.
|
private final EntityExchangeResult<B> result
DefaultBodySpec(EntityExchangeResult<B> result)
protected EntityExchangeResult<B> getResult()
public <T extends S> T isEqualTo(B expected)
WebTestClient.BodySpec
isEqualTo
in interface WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>
public <T extends S> T value(<any> matcher)
WebTestClient.BodySpec
Matcher
.value
in interface WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>
public <T extends S,R> T value(java.util.function.Function<B,R> bodyMapper, <any> matcher)
WebTestClient.BodySpec
Matcher
.value
in interface WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>
public <T extends S> T consumeWith(java.util.function.Consumer<EntityExchangeResult<B>> consumer)
WebTestClient.BodySpec
Consumer
.consumeWith
in interface WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>
private <T extends S> T self()
public EntityExchangeResult<B> returnResult()
WebTestClient.BodySpec
ExchangeResult
with the
decoded response content.returnResult
in interface WebTestClient.BodySpec<B,S extends WebTestClient.BodySpec<B,S>>