Merge branch '2.1.x'

Closes gh-17079
This commit is contained in:
Andy Wilkinson
2019-06-07 11:00:44 +01:00
2799 changed files with 28402 additions and 47836 deletions

View File

@@ -38,23 +38,21 @@ class SampleWebFluxApplicationTests {
@Test
void testWelcome() {
this.webClient.get().uri("/").accept(MediaType.TEXT_PLAIN).exchange()
.expectBody(String.class).isEqualTo("Hello World");
this.webClient.get().uri("/").accept(MediaType.TEXT_PLAIN).exchange().expectBody(String.class)
.isEqualTo("Hello World");
}
@Test
void testEcho() {
this.webClient.post().uri("/echo").contentType(MediaType.TEXT_PLAIN)
.accept(MediaType.TEXT_PLAIN)
.body(Mono.just("Hello WebFlux!"), String.class).exchange()
.expectBody(String.class).isEqualTo("Hello WebFlux!");
this.webClient.post().uri("/echo").contentType(MediaType.TEXT_PLAIN).accept(MediaType.TEXT_PLAIN)
.body(Mono.just("Hello WebFlux!"), String.class).exchange().expectBody(String.class)
.isEqualTo("Hello WebFlux!");
}
@Test
void testActuatorStatus() {
this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isOk().expectBody()
.json("{\"status\":\"UP\"}");
this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON).exchange().expectStatus().isOk()
.expectBody().json("{\"status\":\"UP\"}");
}
}