JAVA-3570: Fix unit tests in persistence-modules/redis

This commit is contained in:
Krzysztof Woyke 2020-12-11 13:16:09 +01:00
parent 8f5f322273
commit 8a264a9981
2 changed files with 4 additions and 4 deletions

View File

@ -10,15 +10,15 @@ import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.baeldung.spring.redis.configuration.entity.Book;
import com.baeldung.spring.redis.configuration.repository.BooksRepository;
@RunWith(SpringJUnit4ClassRunner.class)
@RunWith(MockitoJUnitRunner.class)
public class BooksControllerUnitTest {
@Spy
@InjectMocks
private BooksController booksController;

View File

@ -11,16 +11,16 @@ import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.baeldung.spring.redis.configuration.entity.Book;
@RunWith(SpringJUnit4ClassRunner.class)
@RunWith(MockitoJUnitRunner.class)
public class BooksRepositoryUnitTest {
@Spy
@InjectMocks
private BooksRepository booksRepository;