use of org.mapstruct.ap.test.inheritedmappingmethod._target.FastCarDto 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);
}
Aggregations