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;
* 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()
{