Switch to manual mocking instead of using Mockito annotation.
Closes #2409
This commit is contained in:
@@ -16,13 +16,12 @@
|
||||
package org.springframework.data.rest.webmvc;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.mockito.Answers;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.rest.tests.AbstractControllerIntegrationTests;
|
||||
import org.springframework.data.rest.webmvc.jpa.Book;
|
||||
@@ -36,7 +35,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
@ContextConfiguration(classes = JpaRepositoryConfig.class)
|
||||
@Transactional
|
||||
class RepositoryPropertyReferenceControllerIntegrationTests extends AbstractControllerIntegrationTests {
|
||||
@@ -45,7 +43,8 @@ class RepositoryPropertyReferenceControllerIntegrationTests extends AbstractCont
|
||||
@Autowired TestDataPopulator populator;
|
||||
@Autowired BookRepository books;
|
||||
|
||||
@Mock(answer = Answers.RETURNS_MOCKS) RepresentationModelAssemblers assembler;
|
||||
RepresentationModelAssemblers assembler = mock(RepresentationModelAssemblers.class,
|
||||
withSettings().defaultAnswer(Answers.RETURNS_MOCKS));
|
||||
RootResourceInformation information;
|
||||
|
||||
@BeforeEach
|
||||
|
||||
Reference in New Issue
Block a user