use of org.mapstruct.ap.test.builder.multiple.build.Process in project mapstruct by mapstruct.
the class MultipleBuilderMapperTest method builderMappingDefined.
@WithClasses({ BuilderDefinedMapper.class })
@ProcessorTest
public void builderMappingDefined() {
Process map = BuilderDefinedMapper.INSTANCE.map(new Source("map"));
Process wrongMap = BuilderDefinedMapper.INSTANCE.wrongMap(new Source("wrongMap"));
assertThat(map.getBuildMethod()).isEqualTo("create");
assertThat(wrongMap.getBuildMethod()).isEqualTo("wrongCreate");
}
use of org.mapstruct.ap.test.builder.multiple.build.Process in project mapstruct by mapstruct.
the class MultipleBuilderMapperTest method builderMappingMapperConfigDefined.
@WithClasses({ BuilderMapperConfig.class, BuilderConfigDefinedMapper.class })
@ProcessorTest
public void builderMappingMapperConfigDefined() {
Process map = BuilderConfigDefinedMapper.INSTANCE.map(new Source("map"));
Process wrongMap = BuilderConfigDefinedMapper.INSTANCE.wrongMap(new Source("wrongMap"));
assertThat(map.getBuildMethod()).isEqualTo("create");
assertThat(wrongMap.getBuildMethod()).isEqualTo("wrongCreate");
}
Aggregations