Search in sources :

Example 1 with AddressDto

use of org.mapstruct.ap.test.decorator.AddressDto in project mapstruct by mapstruct.

the class SpringDecoratorTest method shouldDelegateNonDecoratedMethodsToDefaultImplementation.

@ProcessorTest
public void shouldDelegateNonDecoratedMethodsToDefaultImplementation() {
    // given
    Address address = new Address("42 Ocean View Drive");
    // when
    AddressDto addressDto = personMapper.addressToAddressDto(address);
    // then
    assertThat(addressDto).isNotNull();
    assertThat(addressDto.getAddressLine()).isEqualTo("42 Ocean View Drive");
}
Also used : Address(org.mapstruct.ap.test.decorator.Address) AddressDto(org.mapstruct.ap.test.decorator.AddressDto) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Example 2 with AddressDto

use of org.mapstruct.ap.test.decorator.AddressDto in project mapstruct by mapstruct.

the class SpringDecoratorTest method shouldDelegateNonDecoratedMethodsToDefaultImplementation.

@ProcessorTest
public void shouldDelegateNonDecoratedMethodsToDefaultImplementation() {
    // given
    Address address = new Address("42 Ocean View Drive");
    // when
    AddressDto addressDto = personMapper.addressToAddressDto(address);
    // then
    assertThat(addressDto).isNotNull();
    assertThat(addressDto.getAddressLine()).isEqualTo("42 Ocean View Drive");
}
Also used : Address(org.mapstruct.ap.test.decorator.Address) AddressDto(org.mapstruct.ap.test.decorator.AddressDto) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Example 3 with AddressDto

use of org.mapstruct.ap.test.decorator.AddressDto in project mapstruct by mapstruct.

the class Jsr330DecoratorTest method shouldDelegateNonDecoratedMethodsToDefaultImplementation.

@ProcessorTest
public void shouldDelegateNonDecoratedMethodsToDefaultImplementation() {
    Address address = new Address("42 Ocean View Drive");
    AddressDto addressDto = personMapper.addressToAddressDto(address);
    assertThat(addressDto).isNotNull();
    assertThat(addressDto.getAddressLine()).isEqualTo("42 Ocean View Drive");
}
Also used : Address(org.mapstruct.ap.test.decorator.Address) AddressDto(org.mapstruct.ap.test.decorator.AddressDto) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Aggregations

Address (org.mapstruct.ap.test.decorator.Address)3 AddressDto (org.mapstruct.ap.test.decorator.AddressDto)3 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)3