JAVA-13721 Further formatting of files

This commit is contained in:
Dhawal Kapil 2023-05-16 23:06:58 +05:30
parent 7b8fad5dc9
commit 585d1e1575
8 changed files with 27 additions and 24 deletions

View File

@ -1,7 +1,5 @@
package com.baeldung.mockito.argumentcaptor;
public enum AuthenticationStatus {
AUTHENTICATED,
NOT_AUTHENTICATED,
ERROR
AUTHENTICATED, NOT_AUTHENTICATED, ERROR
}

View File

@ -1,7 +1,5 @@
package com.baeldung.mockito.argumentcaptor;
public enum ServiceStatus {
UP,
DOWN,
AUTHENTICATED
UP, DOWN, AUTHENTICATED
}

View File

@ -17,18 +17,23 @@ public class User {
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;
}

View File

@ -5,6 +5,7 @@ import com.baeldung.mockito.junit5.User;
public interface UserRepository {
User insert(User user);
boolean isUsernameAlreadyExists(String userName);
}

View File

@ -30,7 +30,8 @@ public class DefaultUserService implements UserService {
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);
}