use of org.mapstruct.ap.test.builtin._target.IterableTarget in project mapstruct by mapstruct.
the class BuiltInTest method shouldApplyBuiltInOnIterable.
@ProcessorTest
@WithClasses(IterableSourceTargetMapper.class)
public void shouldApplyBuiltInOnIterable() throws DatatypeConfigurationException {
IterableSource source = new IterableSource();
source.setDates(Arrays.asList(createXmlCal(1999, 3, 2, 60)));
source.publicDates = Arrays.asList(createXmlCal(2016, 3, 2, 60));
IterableTarget target = IterableSourceTargetMapper.INSTANCE.sourceToTarget(source);
assertThat(target).isNotNull();
assertThat(target.getDates()).containsExactly("02.03.1999");
assertThat(target.publicDates).containsExactly("02.03.2016");
}
Aggregations