use of org.mapstruct.ap.test.collection.adder.source.SingleElementSource in project mapstruct by mapstruct.
the class AdderTest method testSingleElementSource.
@IssueKey("242")
@ProcessorTest
public void testSingleElementSource() {
AdderUsageObserver.setUsed(false);
SingleElementSource source = new SingleElementSource();
source.setPet("mouse");
Target target = SourceTargetMapper.INSTANCE.fromSingleElementSource(source);
assertThat(target).isNotNull();
assertThat(target.getPets().size()).isEqualTo(1);
assertThat(target.getPets().get(0)).isEqualTo(2L);
assertTrue(AdderUsageObserver.isUsed());
}
Aggregations