use of org.mapstruct.ap.test.imports.innerclasses.BeanFacade in project mapstruct by mapstruct.
the class InnerClassesImportsTest method mapperRequiresInnerEnumImports.
@ProcessorTest
@IssueKey("209")
public void mapperRequiresInnerEnumImports() {
BeanWithInnerEnum source = new BeanWithInnerEnum();
source.setTest("whatever");
source.setInnerEnum(InnerEnum.A);
BeanFacade target = BeanWithInnerEnumMapper.INSTANCE.toFacade(source);
assertThat(target).isNotNull();
assertThat(target.getInnerEnum()).isEqualTo("A");
BeanWithInnerEnum sourceAgain = BeanWithInnerEnumMapper.INSTANCE.fromFacade(target);
assertThat(sourceAgain).isNotNull();
assertThat(sourceAgain.getInnerEnum()).isEqualTo(InnerEnum.A);
generatedSource.addComparisonToFixtureFor(BeanWithInnerEnumMapper.class);
}
Aggregations