Polishing

This commit is contained in:
Sebastien Deleuze
2017-04-25 12:16:11 +02:00
parent b9dbac7b2c
commit 20718e682e
2 changed files with 2 additions and 4 deletions

View File

@@ -19,7 +19,6 @@ package org.springframework.test.web.reactive.server.samples.bind;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Mono;
import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer;
@@ -48,7 +47,7 @@ public class HttpServerTests {
HttpHandler httpHandler = RouterFunctions.toHttpHandler(
route(GET("/test"), request ->
ServerResponse.ok().body(Mono.just("It works!"), String.class)));
ServerResponse.ok().syncBody("It works!")));
this.server = new ReactorHttpServer();
this.server.setHandler(httpHandler);

View File

@@ -18,7 +18,6 @@ package org.springframework.test.web.reactive.server.samples.bind;
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Mono;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.reactive.function.server.RouterFunction;
@@ -42,7 +41,7 @@ public class RouterFunctionTests {
public void setUp() throws Exception {
RouterFunction<?> route = route(GET("/test"), request ->
ServerResponse.ok().body(Mono.just("It works!"), String.class));
ServerResponse.ok().syncBody("It works!"));
this.testClient = WebTestClient.bindToRouterFunction(route).build();
}