formatted the source code
This commit is contained in:
parent
f0947ae8fb
commit
e9925d390c
|
@ -13,14 +13,10 @@ import org.mapstruct.Mappings;
|
|||
@Mapper
|
||||
public interface EmployeeMapper {
|
||||
|
||||
@Mappings({ @Mapping(target = "employeeId", source = "entity.id"),
|
||||
@Mapping(target = "employeeName", source = "entity.name"),
|
||||
@Mapping(target = "employeeStartDt",source = "entity.startDt", dateFormat = "dd-MM-yyyy HH:mm:ss")})
|
||||
@Mappings({ @Mapping(target = "employeeId", source = "entity.id"), @Mapping(target = "employeeName", source = "entity.name"), @Mapping(target = "employeeStartDt", source = "entity.startDt", dateFormat = "dd-MM-yyyy HH:mm:ss") })
|
||||
EmployeeDTO employeeToEmployeeDTO(Employee entity);
|
||||
|
||||
@Mappings({ @Mapping(target = "id", source = "dto.employeeId"),
|
||||
@Mapping(target = "name", source = "dto.employeeName"),
|
||||
@Mapping(target = "startDt",source = "dto.employeeStartDt", dateFormat = "dd-MM-yyyy HH:mm:ss")})
|
||||
@Mappings({ @Mapping(target = "id", source = "dto.employeeId"), @Mapping(target = "name", source = "dto.employeeName"), @Mapping(target = "startDt", source = "dto.employeeStartDt", dateFormat = "dd-MM-yyyy HH:mm:ss") })
|
||||
Employee employeeDTOtoEmployee(EmployeeDTO dto);
|
||||
|
||||
DivisionDTO divisionToDivisionDTO(Division entity);
|
||||
|
|
|
@ -108,8 +108,7 @@ public class EmployeeMapperTest {
|
|||
|
||||
EmployeeDTO dto = mapper.employeeToEmployeeDTO(entity);
|
||||
SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT);
|
||||
assertEquals(format.parse(dto.getEmployeeStartDt()).toString(),
|
||||
entity.getStartDt().toString());
|
||||
assertEquals(format.parse(dto.getEmployeeStartDt()).toString(), entity.getStartDt().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -119,7 +118,6 @@ public class EmployeeMapperTest {
|
|||
|
||||
Employee entity = mapper.employeeDTOtoEmployee(dto);
|
||||
SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT);
|
||||
assertEquals(format.parse(dto.getEmployeeStartDt()).toString(),
|
||||
entity.getStartDt().toString());
|
||||
assertEquals(format.parse(dto.getEmployeeStartDt()).toString(), entity.getStartDt().toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue