Search in sources :

Example 1 with FastCar

use of org.mapstruct.ap.test.inheritedmappingmethod.source.FastCar in project mapstruct by mapstruct.

the class InheritedMappingMethodTest method shouldMapUsingBoundedInheretedMappingMethod.

@ProcessorTest
public void shouldMapUsingBoundedInheretedMappingMethod() {
    // given
    FastCarDto bikeDto = new FastCarDto();
    bikeDto.setHorsepower(130);
    bikeDto.setCoolnessFactor(243);
    // when
    BoundMappable<FastCarDto, FastCar> instance = FastCarMapper.INSTANCE;
    FastCar bike = instance.from(bikeDto);
    // then
    assertThat(bike).isNotNull();
    assertThat(bike.getHorsepower()).isEqualTo(130);
    assertThat(bike.getCoolnessFactor()).isEqualTo(243);
}
Also used : FastCarDto(org.mapstruct.ap.test.inheritedmappingmethod._target.FastCarDto) FastCar(org.mapstruct.ap.test.inheritedmappingmethod.source.FastCar) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Aggregations

FastCarDto (org.mapstruct.ap.test.inheritedmappingmethod._target.FastCarDto)1 FastCar (org.mapstruct.ap.test.inheritedmappingmethod.source.FastCar)1 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)1