use of org.mapstruct.ap.test.bugs._2318.Issue2318Mapper.SourceChild in project mapstruct by mapstruct.
the class Issue2318Test method shouldMap.
@ProcessorTest
@WithClasses(Issue2318Mapper.class)
public void shouldMap() {
SourceChild source = new SourceChild();
source.setValue("From child");
source.setHolder(new Issue2318Mapper.SourceParent.Holder());
source.getHolder().setParentValue1("From parent");
source.getHolder().setParentValue2(12);
TargetChild target = Issue2318Mapper.INSTANCE.mapChild(source);
assertThat(target.getParentValue1()).isEqualTo("From parent");
assertThat(target.getParentValue2()).isEqualTo(12);
assertThat(target.getChildValue()).isEqualTo("From child");
}
Aggregations