@ -13,6 +13,7 @@
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License .
* /
package org.springframework.test.web.reactive.server.samples ;
import java.net.URI ;
@ -23,7 +24,6 @@ import java.util.Map;
@@ -23,7 +24,6 @@ import java.util.Map;
import com.fasterxml.jackson.annotation.JsonCreator ;
import com.fasterxml.jackson.annotation.JsonProperty ;
import org.junit.Before ;
import org.junit.Test ;
import reactor.core.publisher.Flux ;
import reactor.core.publisher.Mono ;
@ -48,17 +48,11 @@ import static org.springframework.http.MediaType.TEXT_EVENT_STREAM;
@@ -48,17 +48,11 @@ import static org.springframework.http.MediaType.TEXT_EVENT_STREAM;
* Annotated controllers accepting and returning typed Objects .
*
* @author Rossen Stoyanchev
* @since 5 . 0
* /
@SuppressWarnings ( "unused" )
public class ResponseEntityTests {
private WebTestClient client ;
@Before
public void setUp ( ) throws Exception {
this . client = WebTestClient . bindToController ( new PersonController ( ) ) . build ( ) ;
}
private final WebTestClient client = WebTestClient . bindToController ( new PersonController ( ) ) . build ( ) ;
@Test
@ -152,6 +146,7 @@ public class ResponseEntityTests {
@@ -152,6 +146,7 @@ public class ResponseEntityTests {
}
@GetMapping ( produces = "text/event-stream" )
@SuppressWarnings ( "deprecation" )
Flux < Person > getPersonStream ( ) {
return Flux . intervalMillis ( 100 ) . onBackpressureBuffer ( 10 ) . map ( index - > new Person ( "N" + index ) ) ;
}