Search in sources :

Example 1 with SourceWithInnerClass

use of org.mapstruct.ap.test.imports.innerclasses.SourceWithInnerClass in project mapstruct by mapstruct.

the class InnerClassesImportsTest method mapperRequiresInnerClassImports.

@ProcessorTest
@IssueKey("412")
public void mapperRequiresInnerClassImports() {
    SourceWithInnerClass source = new SourceWithInnerClass();
    source.setInnerClassMember(new SourceInnerClass(412));
    TargetWithInnerClass target = InnerClassMapper.INSTANCE.sourceToTarget(source);
    assertThat(target).isNotNull();
    assertThat(target.getInnerClassMember().getValue()).isEqualTo(412);
    generatedSource.addComparisonToFixtureFor(InnerClassMapper.class);
}
Also used : SourceWithInnerClass(org.mapstruct.ap.test.imports.innerclasses.SourceWithInnerClass) SourceInnerClass(org.mapstruct.ap.test.imports.innerclasses.SourceWithInnerClass.SourceInnerClass) TargetWithInnerClass(org.mapstruct.ap.test.imports.innerclasses.TargetWithInnerClass) IssueKey(org.mapstruct.ap.testutil.IssueKey) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Aggregations

SourceWithInnerClass (org.mapstruct.ap.test.imports.innerclasses.SourceWithInnerClass)1 SourceInnerClass (org.mapstruct.ap.test.imports.innerclasses.SourceWithInnerClass.SourceInnerClass)1 TargetWithInnerClass (org.mapstruct.ap.test.imports.innerclasses.TargetWithInnerClass)1 IssueKey (org.mapstruct.ap.testutil.IssueKey)1 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)1