Fix checkstyle errors

This commit is contained in:
cugurlu
2019-03-17 17:08:46 +01:00
parent f5fa03b104
commit 07c76dd385
18 changed files with 577 additions and 462 deletions

View File

@@ -4,15 +4,15 @@ package greenify.common;
// is an object that carries data between processes.
// The motivation for its use is that communication between processes is usually done
// resorting to remote interfaces (e.g., web services), where each call is an expensive operation.
public class UserDTO {
public class UserDto {
private Long id;
private String name;
public UserDTO() {
public UserDto() {
}
public UserDTO(Long id, String name) {
public UserDto(Long id, String name) {
this.id = id;
this.name = name;
}

View File

@@ -1,14 +1,14 @@
import greenify.common.UserDTO;
import greenify.common.UserDto;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class UserDTOTest {
public class UserDtoTest {
@Test
public void setAndGetTest() {
UserDTO user = new UserDTO(1L, "greenify");
UserDTO testUser = new UserDTO();
UserDto user = new UserDto(1L, "greenify");
UserDto testUser = new UserDto();
testUser.setId(1L);
testUser.setName("greenify");
assertTrue(user.getId() == 1L);
@@ -17,8 +17,8 @@ public class UserDTOTest {
@Test
public void equalsTest() {
UserDTO first = new UserDTO(1L, "greenify");
UserDTO second = new UserDTO(1L, "greenify");
UserDto first = new UserDto(1L, "greenify");
UserDto second = new UserDto(1L, "greenify");
assertEquals(first.getId(), second.getId());
assertEquals(first.getName(), second.getName());
}