From aeb8f3ebebe6e495f52193614bbfa85af72115d5 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 11 Jan 2020 14:58:16 +0100 Subject: [PATCH] WIP:Bad Unit-Test --- src/test/java/de/juplo/demo/RemoteContentServiceTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/de/juplo/demo/RemoteContentServiceTest.java b/src/test/java/de/juplo/demo/RemoteContentServiceTest.java index 40a85b5..b3f4e8a 100644 --- a/src/test/java/de/juplo/demo/RemoteContentServiceTest.java +++ b/src/test/java/de/juplo/demo/RemoteContentServiceTest.java @@ -1,7 +1,6 @@ package de.juplo.demo; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import static org.mockito.ArgumentMatchers.eq; @@ -13,6 +12,7 @@ import org.springframework.web.reactive.function.client.WebClient.RequestHeaders import org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec; import org.springframework.web.reactive.function.client.WebClient.ResponseSpec; import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; /** @@ -44,7 +44,9 @@ public class RemoteContentServiceTest Mono result = service.getRemoteText("/foo"); - assertThat(result).isNotNull(); - assertThat(result.block()).isEqualTo("bar"); + StepVerifier + .create(result) + .expectNext("bar") + .verifyComplete(); } } -- 2.20.1