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 @Test
public void testWelcome() throws Exception { public void testWelcome() throws Exception {
this.webClient.get().uri("/").accept(MediaType.TEXT_PLAIN).exchange() 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 @Test
public void shouldFindController1() { public void shouldFindController1() {
this.webClient.get().uri("/one").exchange().expectStatus().isOk() this.webClient.get().uri("/one").exchange().expectStatus().isOk()
.expectBody(String.class).value().isEqualTo("one"); .expectBody(String.class).isEqualTo("one");
} }
@Test @Test
public void shouldFindController2() { public void shouldFindController2() {
this.webClient.get().uri("/two").exchange().expectStatus().isOk() 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 @Test
public void shouldFindController() { public void shouldFindController() {
this.webClient.get().uri("/one").exchange().expectStatus().isOk() this.webClient.get().uri("/one").exchange().expectStatus().isOk()
.expectBody(String.class).value().isEqualTo("one"); .expectBody(String.class).isEqualTo("one");
} }
@Test @Test

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

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

Loading…
Cancel
Save