From 313c0d4232e54f085fdc334436a9e81a391dfc9d Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Tue, 14 Jan 2020 09:12:51 +0100 Subject: [PATCH] WIP:it FIX! --- .../java/de/juplo/demo/DemoApplicationIT.java | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/test/java/de/juplo/demo/DemoApplicationIT.java b/src/test/java/de/juplo/demo/DemoApplicationIT.java index 00fdbd4..1c628c4 100644 --- a/src/test/java/de/juplo/demo/DemoApplicationIT.java +++ b/src/test/java/de/juplo/demo/DemoApplicationIT.java @@ -1,34 +1,26 @@ package de.juplo.demo; -import de.juplo.demo.DemoApplicationIT.Application; import java.net.URI; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import static org.mockserver.matchers.Times.exactly; import static org.mockserver.model.HttpForward.forward; import static org.mockserver.model.HttpRequest.request; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationContext; +import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; -import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; +import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.function.client.WebClient; -@SpringJUnitConfig(Application.class) +@ExtendWith(SpringExtension.class) +@WebFluxTest class DemoApplicationIT extends IntegrationTestBase { - WebTestClient webClient; @Autowired - ApplicationContext context; - - - @BeforeEach - void setUp() - { - webClient = WebTestClient.bindToApplicationContext(context).build(); - } + WebTestClient webClient; @Test -- 2.20.1