Search in sources :

Example 1 with AddressDto

use of org.mapstruct.ap.test.bugs._2170.dto.AddressDto in project mapstruct by mapstruct.

the class Issue2170Test method shouldGenerateCodeThatCompiles.

@ProcessorTest
public void shouldGenerateCodeThatCompiles() {
    AddressDto addressDto = AddressMapper.INSTANCE.toDto(new Address("10000", Collections.singletonList(new Person("Tester"))));
    assertThat(addressDto).isNotNull();
    assertThat(addressDto.getZipCode()).isEqualTo("10000");
    assertThat(addressDto.getPeople()).extracting(PersonDto::getName).containsExactly("Tester");
}
Also used : Address(org.mapstruct.ap.test.bugs._2170.entity.Address) AddressDto(org.mapstruct.ap.test.bugs._2170.dto.AddressDto) Person(org.mapstruct.ap.test.bugs._2170.entity.Person) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Aggregations

AddressDto (org.mapstruct.ap.test.bugs._2170.dto.AddressDto)1 Address (org.mapstruct.ap.test.bugs._2170.entity.Address)1 Person (org.mapstruct.ap.test.bugs._2170.entity.Person)1 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)1