Fix WebClientTest calls

Update calls to WebClientTest following upstream changes.
pull/95/merge
Phillip Webb 8 years ago
parent bcd79dd992
commit 700f0ea93c

@ -41,7 +41,7 @@ public class SampleWebFluxApplicationTests {
@Test
public void testWelcome() throws Exception {
this.webClient.get().uri("/").accept(MediaType.TEXT_PLAIN).exchange()
.expectBody(String.class).value().isEqualTo("Hello World");
.expectBody(String.class).isEqualTo("Hello World");
}
}

@ -39,13 +39,13 @@ public class WebFluxTestAllControllersIntegrationTests {
@Test
public void shouldFindController1() {
this.webClient.get().uri("/one").exchange().expectStatus().isOk()
.expectBody(String.class).value().isEqualTo("one");
.expectBody(String.class).isEqualTo("one");
}
@Test
public void shouldFindController2() {
this.webClient.get().uri("/two").exchange().expectStatus().isOk()
.expectBody(String.class).value().isEqualTo("two");
.expectBody(String.class).isEqualTo("two");
}
}

@ -39,7 +39,7 @@ public class WebFluxTestOneControllerIntegrationTests {
@Test
public void shouldFindController() {
this.webClient.get().uri("/one").exchange().expectStatus().isOk()
.expectBody(String.class).value().isEqualTo("one");
.expectBody(String.class).isEqualTo("one");
}
@Test

@ -48,13 +48,13 @@ public class WebTestClientSpringBootTestIntegrationTests {
@Test
public void shouldFindController1() {
this.webClient.get().uri("/one").exchange().expectStatus().isOk()
.expectBody(String.class).value().isEqualTo("one");
.expectBody(String.class).isEqualTo("one");
}
@Test
public void shouldFindController2() {
this.webClient.get().uri("/two").exchange().expectStatus().isOk()
.expectBody(String.class).value().isEqualTo("two");
.expectBody(String.class).isEqualTo("two");
}
@Test

@ -67,13 +67,13 @@ public abstract class AbstractSpringBootTestEmbeddedReactiveWebEnvironmentTests
public void runAndTestHttpEndpoint() {
assertThat(this.port).isNotEqualTo(8080).isNotEqualTo(0);
WebTestClient.bindToServer().baseUrl("http://localhost:" + this.port).build()
.get().uri("/").exchange().expectBody(String.class).value()
.get().uri("/").exchange().expectBody(String.class)
.isEqualTo("Hello World");
}
@Test
public void injectWebTestClient() {
this.webClient.get().uri("/").exchange().expectBody(String.class).value()
this.webClient.get().uri("/").exchange().expectBody(String.class)
.isEqualTo("Hello World");
}

Loading…
Cancel
Save