Search in sources :

Example 1 with TargetWithAnimals

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

the class AdderTest method useIterationNameFromSource.

@IssueKey("1478")
@ProcessorTest
public void useIterationNameFromSource() {
    generatedSource.addComparisonToFixtureFor(SourceTargetMapperWithDifferentProperties.class);
    SourceWithPets source = new SourceWithPets();
    source.setPets(Arrays.asList("dog", "cat"));
    TargetWithAnimals target = SourceTargetMapperWithDifferentProperties.INSTANCE.map(source);
    assertThat(target.getAnimals()).containsExactly("dog", "cat");
}
Also used : SourceWithPets(org.mapstruct.ap.test.collection.adder.source.SourceWithPets) TargetWithAnimals(org.mapstruct.ap.test.collection.adder._target.TargetWithAnimals) IssueKey(org.mapstruct.ap.testutil.IssueKey) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest)

Aggregations

TargetWithAnimals (org.mapstruct.ap.test.collection.adder._target.TargetWithAnimals)1 SourceWithPets (org.mapstruct.ap.test.collection.adder.source.SourceWithPets)1 IssueKey (org.mapstruct.ap.testutil.IssueKey)1 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)1