WIP:BAD
authorKai Moritz <kai@juplo.de>
Sat, 11 Jan 2020 15:23:41 +0000 (16:23 +0100)
committerKai Moritz <kai@juplo.de>
Sat, 11 Jan 2020 15:23:41 +0000 (16:23 +0100)
src/test/java/de/juplo/demo/RemoteContentServiceTest.java

index b3f4e8a..e458479 100644 (file)
@@ -1,12 +1,13 @@
 package de.juplo.demo;
 
 
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
-import org.mockito.junit.jupiter.MockitoExtension;
 import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
 import org.springframework.web.reactive.function.client.WebClient;
 import org.springframework.web.reactive.function.client.WebClient.RequestHeadersSpec;
 import org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec;
@@ -19,21 +20,28 @@ import reactor.test.StepVerifier;
  * Unit-Test for class {@link RemoteContentService}.
  * @author Kai Moritz
  */
-@ExtendWith(MockitoExtension.class)
+@ExtendWith(SpringExtension.class)
 public class RemoteContentServiceTest
 {
   RemoteContentService service;
 
   @MockBean
   WebClient webClient;
-  @MockBean
+  @MockBean(name = "uriSpec")
   RequestHeadersUriSpec uriSpec;
-  @MockBean
+  @MockBean(name = "headersSpec")
   RequestHeadersSpec headersSpec;
-  @MockBean
+  @MockBean(name = "responseSpec")
   ResponseSpec responseSpec;
 
 
+  @BeforeEach
+  void setUp()
+  {
+    service = new RemoteContentService(webClient);
+  }
+
+
   @Test
   void test()
   {