Skip to content
Snippets Groups Projects
Commit e8876358 authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

Merge branch 'OZG-7837-aggregation-mapping-name' into 'main'

Ozg 7837 aggregation mapping name

See merge request !12
parents fb5fbd1c e15c1626
No related branches found
No related tags found
1 merge request!12Ozg 7837 aggregation mapping name
......@@ -42,6 +42,7 @@ public class ReportingAggregationManagerSettingDto {
@Getter
static class AggregationMappingDto {
private FormIdentifierDto formIdentifier;
private String name;
@Singular
private List<FieldMappingDto> fieldMappings;
}
......
......@@ -9,6 +9,7 @@ import de.ozgcloud.admin.reporting.ReportingAggregationManagerSettingDto.FormIde
public class AggregationMappingDtoTestFactory {
public static final FormIdentifierDto FORM_IDENTIFIER = FormIdentifierDto.builder().formId(FORM_ID).formEngineName(FORM_ENGINE_NAME).build();
public static final String NAME = AggregationMappingTestFactory.NAME;
public static AggregationMappingDto create() {
return createBuilder().build();
......@@ -17,6 +18,7 @@ public class AggregationMappingDtoTestFactory {
public static AggregationMappingDto.AggregationMappingDtoBuilder createBuilder() {
return AggregationMappingDto.builder()
.formIdentifier(FORM_IDENTIFIER)
.name(NAME)
.fieldMapping(FieldMappingDto.builder().sourcePath(SOURCE_PATH).targetPath(TARGET_PATH).build());
}
}
......@@ -77,6 +77,7 @@ public class AggregationMappingEnvironmentSettingITCase {
.formEngineName(PropertiesTestFactory.FORM_ENGINE_NAME_1)
.formId(PropertiesTestFactory.FORM_ID_1)
.build())
.name(PropertiesTestFactory.NAME_1)
.mapping(AggregationMapping.FieldMapping.builder().sourcePath(PropertiesTestFactory.SOURCE_PATH_1_1)
.targetPath(PropertiesTestFactory.TARGET_PATH_1_1).build())
.mapping(AggregationMapping.FieldMapping.builder().sourcePath(PropertiesTestFactory.SOURCE_PATH_1_2)
......@@ -89,6 +90,7 @@ public class AggregationMappingEnvironmentSettingITCase {
.formEngineName(PropertiesTestFactory.FORM_ENGINE_NAME_2)
.formId(PropertiesTestFactory.FORM_ID_2)
.build())
.name(PropertiesTestFactory.NAME_2)
.mapping(AggregationMapping.FieldMapping.builder().sourcePath(PropertiesTestFactory.SOURCE_PATH_2_1)
.targetPath(PropertiesTestFactory.TARGET_PATH_2_1).build())
.mapping(AggregationMapping.FieldMapping.builder().sourcePath(PropertiesTestFactory.SOURCE_PATH_2_2)
......
......@@ -36,6 +36,7 @@ public class PropertiesTestFactory {
public static final PostfachSettingBody POSTFACH = PostfachSettingBodyTestFactory.create();
public static final String FORM_ENGINE_NAME_1 = LoremIpsum.getInstance().getWords(1);
public static final String FORM_ID_1 = LoremIpsum.getInstance().getWords(1);
public static final String NAME_1 = LoremIpsum.getInstance().getWords(1);
public static final String SOURCE_PATH_1_1 = LoremIpsum.getInstance().getWords(1);
public static final String TARGET_PATH_1_1 = LoremIpsum.getInstance().getWords(1);
public static final String SOURCE_PATH_1_2 = LoremIpsum.getInstance().getWords(1);
......@@ -44,6 +45,7 @@ public class PropertiesTestFactory {
public static final String TARGET_PATH_1_3 = LoremIpsum.getInstance().getWords(1);
public static final String FORM_ENGINE_NAME_2 = LoremIpsum.getInstance().getWords(1);
public static final String FORM_ID_2 = LoremIpsum.getInstance().getWords(1);
public static final String NAME_2 = LoremIpsum.getInstance().getWords(1);
public static final String SOURCE_PATH_2_1 = LoremIpsum.getInstance().getWords(1);
public static final String TARGET_PATH_2_1 = LoremIpsum.getInstance().getWords(1);
public static final String SOURCE_PATH_2_2 = LoremIpsum.getInstance().getWords(1);
......@@ -76,6 +78,7 @@ public class PropertiesTestFactory {
return TestUtils.loadTextFile("jsonTemplates/settings/aggregation.json.tmpl",
FORM_ENGINE_NAME_1,
FORM_ID_1,
NAME_1,
SOURCE_PATH_1_1,
TARGET_PATH_1_1,
SOURCE_PATH_1_2,
......@@ -84,6 +87,7 @@ public class PropertiesTestFactory {
TARGET_PATH_1_3,
FORM_ENGINE_NAME_2,
FORM_ID_2,
NAME_2,
SOURCE_PATH_2_1,
TARGET_PATH_2_1,
SOURCE_PATH_2_2,
......
......@@ -12,6 +12,7 @@
"source": {
"ozgcloud.aggregation.aggregationMappings[0].formIdentifier.formEngineName": "%s",
"ozgcloud.aggregation.aggregationMappings[0].formIdentifier.formId": "%s",
"ozgcloud.aggregation.aggregationMappings[0].name": "%s",
"ozgcloud.aggregation.aggregationMappings[0].fieldMappings[0].sourcePath": "%s",
"ozgcloud.aggregation.aggregationMappings[0].fieldMappings[0].targetPath": "%s",
"ozgcloud.aggregation.aggregationMappings[0].fieldMappings[1].sourcePath": "%s",
......@@ -20,6 +21,7 @@
"ozgcloud.aggregation.aggregationMappings[0].fieldMappings[2].targetPath": "%s",
"ozgcloud.aggregation.aggregationMappings[1].formIdentifier.formEngineName": "%s",
"ozgcloud.aggregation.aggregationMappings[1].formIdentifier.formId": "%s",
"ozgcloud.aggregation.aggregationMappings[1].name": "%s",
"ozgcloud.aggregation.aggregationMappings[1].fieldMappings[0].sourcePath": "%s",
"ozgcloud.aggregation.aggregationMappings[1].fieldMappings[0].targetPath": "%s",
"ozgcloud.aggregation.aggregationMappings[1].fieldMappings[1].sourcePath": "%s",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment