[BAEL-16045] - Check Article Code Matches GitHub for https://www.baeldung.com/mapstruct article
This commit is contained in:
@@ -46,7 +46,7 @@ public class EmployeeMapperUnitTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenEmployeeDTOwithNestedMappingToEmployee_whenMaps_thenCorrect() {
|
public void givenEmpDTONestedMappingToEmp_whenMaps_thenCorrect() {
|
||||||
EmployeeDTO dto = new EmployeeDTO();
|
EmployeeDTO dto = new EmployeeDTO();
|
||||||
dto.setDivision(new DivisionDTO(1, "Division1"));
|
dto.setDivision(new DivisionDTO(1, "Division1"));
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ public class EmployeeMapperUnitTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenEmployeeWithStartDateMappingToEmployeeDTO_whenMaps_thenCorrect() throws ParseException {
|
public void givenEmpStartDtMappingToEmpDTO_whenMaps_thenCorrect() throws ParseException {
|
||||||
Employee entity = new Employee();
|
Employee entity = new Employee();
|
||||||
entity.setStartDt(new Date());
|
entity.setStartDt(new Date());
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ public class EmployeeMapperUnitTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenEmployeeDTOWithStartDateMappingToEmployee_whenMaps_thenCorrect() throws ParseException {
|
public void givenEmpDTOStartDtMappingToEmp_whenMaps_thenCorrect() throws ParseException {
|
||||||
EmployeeDTO dto = new EmployeeDTO();
|
EmployeeDTO dto = new EmployeeDTO();
|
||||||
dto.setEmployeeStartDt("01-04-2016 01:00:00");
|
dto.setEmployeeStartDt("01-04-2016 01:00:00");
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class SimpleSourceDestinationMapperIntegrationTest {
|
|||||||
SimpleSourceDestinationMapper simpleSourceDestinationMapper;
|
SimpleSourceDestinationMapper simpleSourceDestinationMapper;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenSimpleSourceToSimpleDestination_whenMaps_thenCorrect() {
|
public void givenSourceToDestination_whenMaps_thenCorrect() {
|
||||||
SimpleSource simpleSource = new SimpleSource();
|
SimpleSource simpleSource = new SimpleSource();
|
||||||
simpleSource.setName("SourceName");
|
simpleSource.setName("SourceName");
|
||||||
simpleSource.setDescription("SourceDescription");
|
simpleSource.setDescription("SourceDescription");
|
||||||
@@ -30,7 +30,7 @@ public class SimpleSourceDestinationMapperIntegrationTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenSimpleDestinationToSourceDestination_whenMaps_thenCorrect() {
|
public void givenDestinationToSource_whenMaps_thenCorrect() {
|
||||||
SimpleDestination destination = new SimpleDestination();
|
SimpleDestination destination = new SimpleDestination();
|
||||||
destination.setName("DestinationName");
|
destination.setName("DestinationName");
|
||||||
destination.setDescription("DestinationDescription");
|
destination.setDescription("DestinationDescription");
|
||||||
|
|||||||
Reference in New Issue
Block a user