use of org.mapstruct.ap.test.bugs._2195.dto.Source 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");
}
use of org.mapstruct.ap.test.bugs._2195.dto.Source in project mapstruct by mapstruct.
the class Issue581Test method shouldMapSourceAndTargetWithTheSameClassName.
@ProcessorTest
public void shouldMapSourceAndTargetWithTheSameClassName() {
Car source = new Car();
org.mapstruct.ap.test.bugs._581._target.Car target = SourceTargetMapper.INSTANCE.sourceToTarget(source);
assertThat(target).isNotNull();
assertThat(target.getFoo()).isEqualTo(source.getFoo());
}
Aggregations