From: Kai Moritz Date: Tue, 14 Jan 2020 09:21:00 +0000 (+0100) Subject: WIP:mapping X-Git-Tag: wip-it~4 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=244d365b915e51e8eeda4c74a1a14c2d6f6915f8;p=demos%2Ftesting WIP:mapping --- diff --git a/src/test/java/de/juplo/demo/MappingIT.java b/src/test/java/de/juplo/demo/MappingIT.java index fa4f703..381183f 100644 --- a/src/test/java/de/juplo/demo/MappingIT.java +++ b/src/test/java/de/juplo/demo/MappingIT.java @@ -3,11 +3,14 @@ package de.juplo.demo; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.reactive.server.WebTestClient; +import reactor.core.publisher.Mono; /** @@ -27,10 +30,12 @@ public class MappingIT @Test void testHtmlController() { + when(service.getRemoteText("foo")).thenReturn(Mono.empty()); webClient .get() .uri("/?path=foo") .exchange() .expectStatus().isOk(); + verify(service).getRemoteText("foo"); } }