use of org.mapstruct.ap.test.collection.adder._target.TargetHuman in project mapstruct by mapstruct.
the class AdderTest method testShouldPreferHumanSingular.
@ProcessorTest
public void testShouldPreferHumanSingular() {
AdderUsageObserver.setUsed(false);
SourceTeeth source = new SourceTeeth();
source.setTeeth(Arrays.asList("moler"));
TargetHuman target = SourceTargetMapper.INSTANCE.toTargetHuman(source);
assertThat(target).isNotNull();
assertThat(target.getTeeth().size()).isEqualTo(1);
assertThat(target.getTeeth().get(0)).isEqualTo(3);
assertTrue(AdderUsageObserver.isUsed());
}
Aggregations