From 20718e682eb1ac673effae2828e9a92022767348 Mon Sep 17 00:00:00 2001 From: Sebastien Deleuze Date: Tue, 25 Apr 2017 12:16:11 +0200 Subject: [PATCH] Polishing --- .../test/web/reactive/server/samples/bind/HttpServerTests.java | 3 +-- .../web/reactive/server/samples/bind/RouterFunctionTests.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java b/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java index f8599fc37d5..8abf7b3a3a2 100644 --- a/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java +++ b/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; 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); diff --git a/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/RouterFunctionTests.java b/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/RouterFunctionTests.java index e2d727e04dc..dd3800256bc 100644 --- a/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/RouterFunctionTests.java +++ b/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; 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(); }