Rename WebClient.ResponseSpec.bodyToEntity[List] to toEntity[List]

This commit renames `WebClient.ResponseSpec.bodyToEntity` to `toEntity`
and similarly renames `WebClient.ResponseSpec.bodyToEntityList` to
`toEntityList`. In both cases, the `body` prefix was dropped because the
return value contains more than the body.

Issue: SPR-15486
This commit is contained in:
Arjen Poutsma
2017-04-26 17:00:30 +02:00
parent 299b9d60fd
commit 0e7d6fc4d1
4 changed files with 15 additions and 16 deletions

View File

@@ -38,8 +38,7 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.http.codec.Pojo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.*;
/**
* Integration tests using a {@link ExchangeFunction} through {@link WebClient}.
@@ -169,7 +168,7 @@ public class WebClientIntegrationTests {
.uri("/json")
.accept(MediaType.APPLICATION_JSON)
.retrieve()
.bodyToEntity(String.class);
.toEntity(String.class);
StepVerifier.create(result)
.consumeNextWith(entity -> {
@@ -196,7 +195,7 @@ public class WebClientIntegrationTests {
.uri("/json")
.accept(MediaType.APPLICATION_JSON)
.retrieve()
.bodyToEntityList(Pojo.class);
.toEntityList(Pojo.class);
StepVerifier.create(result)
.consumeNextWith(entity -> {