Search in sources :

Example 1 with Process

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");
}
Also used : Process(org.mapstruct.ap.test.builder.multiple.build.Process) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest) WithClasses(org.mapstruct.ap.testutil.WithClasses)

Example 2 with Process

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");
}
Also used : Process(org.mapstruct.ap.test.builder.multiple.build.Process) ProcessorTest(org.mapstruct.ap.testutil.ProcessorTest) WithClasses(org.mapstruct.ap.testutil.WithClasses)

Aggregations

Process (org.mapstruct.ap.test.builder.multiple.build.Process)2 ProcessorTest (org.mapstruct.ap.testutil.ProcessorTest)2 WithClasses (org.mapstruct.ap.testutil.WithClasses)2