Merge pull request #13922 from dkapil/task/JAVA-13721
JAVA-13721 Format, Fix Package, Upgrade version of all the articles
This commit is contained in:
@@ -794,6 +794,7 @@
|
||||
<module>spring-reactive-modules</module>
|
||||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
<module>testing-modules/testing-assertions</module>
|
||||
<module>testing-modules/mockito-simple</module>
|
||||
<module>persistence-modules/fauna</module>
|
||||
<module>persistence-modules/spring-data-rest</module>
|
||||
|
||||
@@ -1050,6 +1051,7 @@
|
||||
<module>spring-reactive-modules</module>
|
||||
<module>spring-swagger-codegen/custom-validations-opeanpi-codegen</module>
|
||||
<module>testing-modules/testing-assertions</module>
|
||||
<module>testing-modules/mockito-simple</module>
|
||||
<module>persistence-modules/fauna</module>
|
||||
<module>persistence-modules/spring-data-rest</module>
|
||||
|
||||
|
||||
@@ -55,9 +55,8 @@
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<spring-framework.version>5.3.20</spring-framework.version>
|
||||
<!-- testing -->
|
||||
<mockito.version>4.8.0</mockito.version>
|
||||
<spring-framework.version>6.0.8</spring-framework.version>
|
||||
<mockito.version>5.3.1</mockito.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
package com.baeldung.domain.service;
|
||||
|
||||
import com.baeldung.domain.model.Message;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class MessageService {
|
||||
|
||||
public Message deliverMessage (Message message) {
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
package com.baeldung.junit5.mockito.repository;
|
||||
|
||||
import com.baeldung.junit5.mockito.User;
|
||||
|
||||
public interface MailClient {
|
||||
|
||||
void sendUserRegistrationMail(User user);
|
||||
|
||||
}
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
package com.baeldung.junit5.mockito.service;
|
||||
|
||||
import com.baeldung.junit5.mockito.User;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
User register(User user);
|
||||
|
||||
}
|
||||
+1
-3
@@ -1,7 +1,5 @@
|
||||
package com.baeldung.mockito.argumentcaptor;
|
||||
|
||||
public enum AuthenticationStatus {
|
||||
AUTHENTICATED,
|
||||
NOT_AUTHENTICATED,
|
||||
ERROR
|
||||
AUTHENTICATED, NOT_AUTHENTICATED, ERROR
|
||||
}
|
||||
|
||||
+12
-1
@@ -10,5 +10,16 @@ public class Credentials {
|
||||
this.password = password;
|
||||
this.key = key;
|
||||
}
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
package com.baeldung.mockito.argumentcaptor;
|
||||
|
||||
public enum Format {
|
||||
TEXT_ONLY,
|
||||
HTML
|
||||
TEXT_ONLY, HTML
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,7 +1,5 @@
|
||||
package com.baeldung.mockito.argumentcaptor;
|
||||
|
||||
public enum ServiceStatus {
|
||||
UP,
|
||||
DOWN,
|
||||
AUTHENTICATED
|
||||
UP, DOWN, AUTHENTICATED
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.app.api;
|
||||
package com.baeldung.mockito.argumentmatchers;
|
||||
|
||||
public class Flower {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.domain.model;
|
||||
package com.baeldung.mockito.argumentmatchers;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.baeldung.app.api;
|
||||
package com.baeldung.mockito.argumentmatchers;
|
||||
|
||||
public class MessageDTO {
|
||||
|
||||
private String from;
|
||||
private String to;
|
||||
private String text;
|
||||
+6
-5
@@ -1,13 +1,14 @@
|
||||
package com.baeldung.app.rest;
|
||||
package com.baeldung.mockito.argumentmatchers.controller;
|
||||
|
||||
import com.baeldung.app.api.Flower;
|
||||
import com.baeldung.domain.service.FlowerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.baeldung.mockito.argumentmatchers.Flower;
|
||||
import com.baeldung.mockito.argumentmatchers.service.FlowerService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/flowers")
|
||||
public class FlowerController {
|
||||
@@ -16,12 +17,12 @@ public class FlowerController {
|
||||
private FlowerService flowerService;
|
||||
|
||||
@PostMapping("/isAFlower")
|
||||
public String isAFlower (@RequestBody String flower) {
|
||||
public String isAFlower(@RequestBody String flower) {
|
||||
return flowerService.analyze(flower);
|
||||
}
|
||||
|
||||
@PostMapping("/isABigFlower")
|
||||
public Boolean isABigFlower (@RequestBody Flower flower) {
|
||||
public Boolean isABigFlower(@RequestBody Flower flower) {
|
||||
return flowerService.isABigFlower(flower.getName(), flower.getPetals());
|
||||
}
|
||||
}
|
||||
+6
-5
@@ -1,14 +1,15 @@
|
||||
package com.baeldung.app.rest;
|
||||
package com.baeldung.mockito.argumentmatchers.controller;
|
||||
|
||||
import com.baeldung.app.api.MessageDTO;
|
||||
import com.baeldung.domain.model.Message;
|
||||
import com.baeldung.domain.service.MessageService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import com.baeldung.mockito.argumentmatchers.Message;
|
||||
import com.baeldung.mockito.argumentmatchers.MessageDTO;
|
||||
import com.baeldung.mockito.argumentmatchers.service.MessageService;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
@@ -21,7 +22,7 @@ public class MessageController {
|
||||
private MessageService messageService;
|
||||
|
||||
@PostMapping
|
||||
public Message createMessage (@RequestBody MessageDTO messageDTO) {
|
||||
public Message createMessage(@RequestBody MessageDTO messageDTO) {
|
||||
Message message = new Message();
|
||||
message.setText(messageDTO.getText());
|
||||
message.setFrom(messageDTO.getFrom());
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.domain.service;
|
||||
package com.baeldung.mockito.argumentmatchers.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -11,15 +11,15 @@ public class FlowerService {
|
||||
private List<String> flowers = Arrays.asList("Poppy", "Ageratum", "Carnation", "Diascia", "Lantana");
|
||||
|
||||
public String analyze(String name) {
|
||||
if(flowers.contains(name)) {
|
||||
if (flowers.contains(name)) {
|
||||
return "flower";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isABigFlower(String name, int petals) {
|
||||
if(flowers.contains(name)) {
|
||||
if(petals > 10) {
|
||||
if (flowers.contains(name)) {
|
||||
if (petals > 10) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.baeldung.mockito.argumentmatchers.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baeldung.mockito.argumentmatchers.Message;
|
||||
|
||||
@Service
|
||||
public class MessageService {
|
||||
|
||||
public Message deliverMessage(Message message) {
|
||||
|
||||
return message;
|
||||
}
|
||||
}
|
||||
+10
-5
@@ -1,34 +1,39 @@
|
||||
package com.baeldung.junit5.mockito;
|
||||
package com.baeldung.mockito.junit5;
|
||||
|
||||
public class User {
|
||||
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
private int age;
|
||||
|
||||
|
||||
public User() {
|
||||
}
|
||||
|
||||
|
||||
public User(String name, int age) {
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.baeldung.mockito.junit5.repository;
|
||||
|
||||
import com.baeldung.mockito.junit5.User;
|
||||
|
||||
public interface MailClient {
|
||||
|
||||
void sendUserRegistrationMail(User user);
|
||||
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
package com.baeldung.junit5.mockito.repository;
|
||||
package com.baeldung.mockito.junit5.repository;
|
||||
|
||||
public interface SettingRepository {
|
||||
|
||||
|
||||
int getUserMinAge();
|
||||
|
||||
int getUserNameMinLength();
|
||||
+4
-3
@@ -1,10 +1,11 @@
|
||||
package com.baeldung.junit5.mockito.repository;
|
||||
package com.baeldung.mockito.junit5.repository;
|
||||
|
||||
import com.baeldung.junit5.mockito.User;
|
||||
import com.baeldung.mockito.junit5.User;
|
||||
|
||||
public interface UserRepository {
|
||||
|
||||
User insert(User user);
|
||||
|
||||
boolean isUsernameAlreadyExists(String userName);
|
||||
|
||||
|
||||
}
|
||||
+14
-13
@@ -1,16 +1,16 @@
|
||||
package com.baeldung.junit5.mockito.service;
|
||||
package com.baeldung.mockito.junit5.service;
|
||||
|
||||
import com.baeldung.junit5.mockito.User;
|
||||
import com.baeldung.junit5.mockito.repository.MailClient;
|
||||
import com.baeldung.junit5.mockito.repository.SettingRepository;
|
||||
import com.baeldung.junit5.mockito.repository.UserRepository;
|
||||
import com.baeldung.mockito.junit5.User;
|
||||
import com.baeldung.mockito.junit5.repository.MailClient;
|
||||
import com.baeldung.mockito.junit5.repository.SettingRepository;
|
||||
import com.baeldung.mockito.junit5.repository.UserRepository;
|
||||
|
||||
public class DefaultUserService implements UserService {
|
||||
|
||||
|
||||
private UserRepository userRepository;
|
||||
private SettingRepository settingRepository;
|
||||
private MailClient mailClient;
|
||||
|
||||
|
||||
public DefaultUserService(UserRepository userRepository, SettingRepository settingRepository, MailClient mailClient) {
|
||||
this.userRepository = userRepository;
|
||||
this.settingRepository = settingRepository;
|
||||
@@ -26,19 +26,20 @@ public class DefaultUserService implements UserService {
|
||||
}
|
||||
|
||||
private void validate(User user) {
|
||||
if(user.getName() == null) {
|
||||
if (user.getName() == null) {
|
||||
throw new RuntimeException(Errors.USER_NAME_REQUIRED);
|
||||
}
|
||||
|
||||
if(user.getName().length() < settingRepository.getUserNameMinLength()) {
|
||||
if (user.getName()
|
||||
.length() < settingRepository.getUserNameMinLength()) {
|
||||
throw new RuntimeException(Errors.USER_NAME_SHORT);
|
||||
}
|
||||
|
||||
if(user.getAge() < settingRepository.getUserMinAge()) {
|
||||
|
||||
if (user.getAge() < settingRepository.getUserMinAge()) {
|
||||
throw new RuntimeException(Errors.USER_AGE_YOUNG);
|
||||
}
|
||||
|
||||
if(userRepository.isUsernameAlreadyExists(user.getName())) {
|
||||
|
||||
if (userRepository.isUsernameAlreadyExists(user.getName())) {
|
||||
throw new RuntimeException(Errors.USER_NAME_DUPLICATE);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.junit5.mockito.service;
|
||||
package com.baeldung.mockito.junit5.service;
|
||||
|
||||
public class Errors {
|
||||
|
||||
@@ -6,5 +6,5 @@ public class Errors {
|
||||
public static final String USER_NAME_SHORT = "user.name.short";
|
||||
public static final String USER_AGE_YOUNG = "user.age.young";
|
||||
public static final String USER_NAME_DUPLICATE = "user.name.duplicate";
|
||||
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.baeldung.mockito.junit5.service;
|
||||
|
||||
import com.baeldung.mockito.junit5.User;
|
||||
|
||||
public interface UserService {
|
||||
|
||||
User register(User user);
|
||||
|
||||
}
|
||||
-1
@@ -18,5 +18,4 @@ public class StaticUtils {
|
||||
public static String name() {
|
||||
return "Baeldung";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-94
@@ -1,94 +0,0 @@
|
||||
package com.baeldung.app.rest;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.mockito.AdditionalMatchers.or;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
import static org.mockito.ArgumentMatchers.endsWith;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.mockito.InjectMocks;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.exceptions.misusing.InvalidUseOfMatchersException;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import com.baeldung.app.api.Flower;
|
||||
import com.baeldung.domain.service.FlowerService;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class FlowerControllerUnitTest {
|
||||
|
||||
@InjectMocks
|
||||
private FlowerController flowerController;
|
||||
|
||||
@Mock
|
||||
private FlowerService flowerService;
|
||||
|
||||
@Test
|
||||
void givenPoppyFlower_whenUsingDoReturn_thenCorrect() {
|
||||
doReturn("Flower").when(flowerService).analyze("poppy");
|
||||
|
||||
String response = flowerController.isAFlower("poppy");
|
||||
assertThat(response).isEqualTo("Flower");
|
||||
}
|
||||
|
||||
@Test
|
||||
void givenAnyString_whenUsingArgumentMatcher_thenCorrect() {
|
||||
when(flowerService.analyze(anyString())).thenReturn("Flower");
|
||||
|
||||
String response = flowerController.isAFlower("violetta");
|
||||
assertThat(response).isEqualTo("Flower");
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenIncorrectMatchers_thenThrowsError() {
|
||||
assertThrows(InvalidUseOfMatchersException.class, () -> {
|
||||
when(flowerService.isABigFlower("poppy", anyInt())).thenReturn(true);
|
||||
});
|
||||
|
||||
Flower flower = new Flower("poppy", 15);
|
||||
|
||||
Boolean response = flowerController.isABigFlower(flower);
|
||||
assertThat(response).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenCorrectMatchers_thenCorrect() {
|
||||
when(flowerService.isABigFlower(eq("poppy"), anyInt())).thenReturn(true);
|
||||
|
||||
Flower flower = new Flower("poppy", 15);
|
||||
|
||||
Boolean response = flowerController.isABigFlower(flower);
|
||||
assertThat(response).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenUsingMatchersAsReturnValue_thenThrowsError() {
|
||||
flowerController.isAFlower("poppy");
|
||||
|
||||
String orMatcher = or(eq("poppy"), endsWith("y"));
|
||||
assertThrows(InvalidUseOfMatchersException.class, () -> {
|
||||
verify(flowerService).analyze(orMatcher);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenUsingMatchersAsOngoingStubbing_thenCorrect1() {
|
||||
flowerController.isAFlower("poppy");
|
||||
|
||||
verify(flowerService).analyze(or(eq("poppy"), endsWith("y")));
|
||||
}
|
||||
|
||||
@Test
|
||||
void whenUsingMatchersAsOngoingStubbing_thenCorrect2() {
|
||||
flowerController.isAFlower("lily");
|
||||
|
||||
verify(flowerService).analyze(or(eq("poppy"), endsWith("y")));
|
||||
}
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
package com.baeldung.domain.util;
|
||||
|
||||
import com.baeldung.domain.model.Message;
|
||||
import org.mockito.ArgumentMatcher;
|
||||
|
||||
public class MessageMatcher implements ArgumentMatcher<Message> {
|
||||
|
||||
private Message left;
|
||||
|
||||
public MessageMatcher(Message message) {
|
||||
this.left = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(Message right) {
|
||||
return left.getFrom().equals(right.getFrom()) &&
|
||||
left.getTo().equals(right.getTo()) &&
|
||||
left.getText().equals(right.getText()) &&
|
||||
right.getDate() != null &&
|
||||
right.getId() != null;
|
||||
}
|
||||
}
|
||||
@@ -2,9 +2,9 @@ package com.baeldung.mockito;
|
||||
|
||||
public final class FinalList extends MyList {
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int size() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,15 +3,15 @@ package com.baeldung.mockito;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
class MyDictionary {
|
||||
public class MyDictionary {
|
||||
|
||||
private Map<String, String> wordMap;
|
||||
|
||||
MyDictionary() {
|
||||
public MyDictionary() {
|
||||
wordMap = new HashMap<>();
|
||||
}
|
||||
|
||||
MyDictionary(Map<String, String> wordMap) {
|
||||
public MyDictionary(Map<String, String> wordMap) {
|
||||
this.wordMap = wordMap;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class MyDictionary {
|
||||
wordMap.put(word, meaning);
|
||||
}
|
||||
|
||||
String getMeaning(final String word) {
|
||||
public String getMeaning(final String word) {
|
||||
return wordMap.get(word);
|
||||
}
|
||||
}
|
||||
|
||||
+13
-10
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.mockito;
|
||||
package com.baeldung.mockito.annotations;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
@@ -20,6 +20,8 @@ import org.mockito.Mock;
|
||||
import org.mockito.Spy;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
|
||||
import com.baeldung.mockito.MyDictionary;
|
||||
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class MockitoAnnotationUnitTest {
|
||||
|
||||
@@ -29,19 +31,20 @@ class MockitoAnnotationUnitTest {
|
||||
@Spy
|
||||
private List<String> spiedList = new ArrayList<>();
|
||||
|
||||
// Use either @RunWith(MockitoJUnitRunner.class) or manually openMocks in the @Before method
|
||||
// Use either @ExtendWith(MockitoExtension.class) or manually openMocks in the @BeforeEach method
|
||||
/*
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void init() {
|
||||
MockitoAnnotations.openMocks(this);
|
||||
MockitoAnnotations.openMocks(this);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// tests
|
||||
|
||||
@Test
|
||||
void whenNotUseMockAnnotation_thenCorrect() {
|
||||
final List<String> mockList = mock(List.class);
|
||||
final List<String> mockList = mock(ArrayList.class);
|
||||
|
||||
mockList.add("one");
|
||||
verify(mockList).add("one");
|
||||
assertEquals(0, mockList.size());
|
||||
@@ -63,6 +66,7 @@ class MockitoAnnotationUnitTest {
|
||||
@Test
|
||||
void whenNotUseSpyAnnotation_thenCorrect() {
|
||||
final List<String> spyList = spy(new ArrayList<String>());
|
||||
|
||||
spyList.add("one");
|
||||
spyList.add("two");
|
||||
|
||||
@@ -88,11 +92,12 @@ class MockitoAnnotationUnitTest {
|
||||
doReturn(100).when(spiedList).size();
|
||||
assertEquals(100, spiedList.size());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void whenNotUseCaptorAnnotation_thenCorrect() {
|
||||
final List<String> mockList = mock(List.class);
|
||||
final ArgumentCaptor<String> arg = ArgumentCaptor.forClass(String.class);
|
||||
|
||||
mockList.add("one");
|
||||
verify(mockList).add(arg.capture());
|
||||
|
||||
@@ -100,8 +105,7 @@ class MockitoAnnotationUnitTest {
|
||||
}
|
||||
|
||||
@Captor
|
||||
private
|
||||
ArgumentCaptor<String> argCaptor;
|
||||
private ArgumentCaptor<String> argCaptor;
|
||||
|
||||
@Test
|
||||
void whenUseCaptorAnnotation_thenTheSame() {
|
||||
@@ -123,5 +127,4 @@ class MockitoAnnotationUnitTest {
|
||||
|
||||
assertEquals("aMeaning", dic.getMeaning("aWord"));
|
||||
}
|
||||
|
||||
}
|
||||
+1
-3
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.mockito;
|
||||
package com.baeldung.mockito.annotations;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -6,13 +6,11 @@ import org.mockito.Mock;
|
||||
import org.mockito.junit.MockitoJUnit;
|
||||
import org.mockito.junit.MockitoRule;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
public class MockitoAnnotationsInitWithMockitoJUnitRuleUnitTest {
|
||||
|
||||
@Rule
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user