Search in sources :

Example 1 with BeanFacade

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);
}
Also used : BeanWithInnerEnum(org.mapstruct.ap.test.imports.innerclasses.BeanWithInnerEnum) BeanFacade(org.mapstruct.ap.test.imports.innerclasses.BeanFacade) IssueKey(org.mapstruct.ap.testutil.IssueKey) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Aggregations

BeanFacade (org.mapstruct.ap.test.imports.innerclasses.BeanFacade)1 BeanWithInnerEnum (org.mapstruct.ap.test.imports.innerclasses.BeanWithInnerEnum)1 IssueKey (org.mapstruct.ap.testutil.IssueKey)1 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)1