Search in sources :

Example 1 with Target2

use of org.mapstruct.ap.test.collection.adder._target.Target2 in project mapstruct by mapstruct.

the class AdderTest method testMissingImport.

@IssueKey("310")
@ProcessorTest
public void testMissingImport() {
    generatedSource.addComparisonToFixtureFor(Source2Target2Mapper.class);
    Source2 source = new Source2();
    source.setAttributes(Arrays.asList(new Foo()));
    Target2 target = Source2Target2Mapper.INSTANCE.toTarget(source);
    assertThat(target).isNotNull();
    assertThat(target.getAttributes().size()).isEqualTo(1);
}
Also used : Source2(org.mapstruct.ap.test.collection.adder.source.Source2) Foo(org.mapstruct.ap.test.collection.adder.source.Foo) Target2(org.mapstruct.ap.test.collection.adder._target.Target2) IssueKey(org.mapstruct.ap.testutil.IssueKey) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Aggregations

Target2 (org.mapstruct.ap.test.collection.adder._target.Target2)1 Foo (org.mapstruct.ap.test.collection.adder.source.Foo)1 Source2 (org.mapstruct.ap.test.collection.adder.source.Source2)1 IssueKey (org.mapstruct.ap.testutil.IssueKey)1 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)1