WIP:it
authorKai Moritz <kai@juplo.de>
Tue, 14 Jan 2020 07:19:59 +0000 (08:19 +0100)
committerKai Moritz <kai@juplo.de>
Tue, 14 Jan 2020 07:19:59 +0000 (08:19 +0100)
src/test/java/de/juplo/demo/DemoApplicationIT.java

index 4f0d1f9..ef9153a 100644 (file)
@@ -1,14 +1,13 @@
 package de.juplo.demo;
 
 import java.net.URI;
-import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 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.boot.test.autoconfigure.web.reactive.WebFluxTest;
 import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureWebMvc;
+import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.http.MediaType;
@@ -16,24 +15,14 @@ import org.springframework.test.web.servlet.MockMvc;
 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
-import org.springframework.test.web.servlet.setup.MockMvcBuilders;
-import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.reactive.function.client.WebClient;
 
-@WebFluxTest
+@SpringBootTest
 @AutoConfigureWebMvc
 class DemoApplicationIT extends IntegrationTestBase
 {
-  MockMvc mockMvc;
   @Autowired
-  WebApplicationContext context;
-
-
-  @BeforeEach
-  void setUp(WebApplicationContext context)
-  {
-    mockMvc = MockMvcBuilders.webAppContextSetup(context).build();
-  }
+  MockMvc mockMvc;
 
 
   @Test