Browse Source

Polishing

pull/1401/head
Sebastien Deleuze 9 years ago
parent
commit
20718e682e
  1. 3
      spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java
  2. 3
      spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/RouterFunctionTests.java

3
spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java

@ -19,7 +19,6 @@ package org.springframework.test.web.reactive.server.samples.bind; @@ -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 { @@ -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);

3
spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/RouterFunctionTests.java

@ -18,7 +18,6 @@ package org.springframework.test.web.reactive.server.samples.bind; @@ -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 { @@ -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();
}

Loading…
Cancel
Save