use of io.atlasmap.v2.Mapping in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldMappingDefinedNullMapping.
@Test
public void testProcessPropertyFieldMappingDefinedNullMapping() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("prop-int");
AtlasMapping mapping = AtlasTestData.generateAtlasMapping();
mapping.setProperties(null);
propStrategy.processPropertyField(null, propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNull(propField.getValue());
}
use of io.atlasmap.v2.Mapping in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldMappingDefinedNullProperties.
@Test
public void testProcessPropertyFieldMappingDefinedNullProperties() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("prop-int");
AtlasMapping mapping = AtlasTestData.generateAtlasMapping();
mapping.setProperties(null);
propStrategy.processPropertyField(mapping, propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNull(propField.getValue());
}
use of io.atlasmap.v2.Mapping in project atlasmap by atlasmap.
the class DefaultAtlasValidationServiceTest method testValidateAtlasMappingFileHappyPath.
@Test
public void testValidateAtlasMappingFileHappyPath() {
AtlasMapping mapping = getAtlasMappingFullValid();
assertNotNull(mapping);
// validation
validations.addAll(validationService.validateMapping(mapping));
assertFalse(validationHelper.hasErrors());
assertFalse(validationHelper.hasWarnings());
assertFalse(validationHelper.hasInfos());
}
use of io.atlasmap.v2.Mapping in project atlasmap by atlasmap.
the class DefaultAtlasValidationServiceTest method testValidateAtlasMappingFileLookupTablesDuplicateNames.
@Test
public void testValidateAtlasMappingFileLookupTablesDuplicateNames() {
AtlasMapping mapping = getAtlasMappingWithLookupTables("duplicate_name", "duplicate_name");
validations.addAll(validationService.validateMapping(mapping));
assertTrue(validationHelper.hasErrors());
assertFalse(validationHelper.hasWarnings());
assertFalse(validationHelper.hasInfos());
}
use of io.atlasmap.v2.Mapping in project atlasmap by atlasmap.
the class DefaultAtlasValidationServiceTest method testValidateAtlasMappingFileHappyPath2.
@Test
public void testValidateAtlasMappingFileHappyPath2() {
AtlasMapping mapping = getAtlasMappingFullValid();
assertNotNull(mapping);
// validation
validations.addAll(validationService.validateMapping(mapping));
assertFalse(validationHelper.hasErrors());
assertFalse(validationHelper.hasWarnings());
assertFalse(validationHelper.hasInfos());
}
Aggregations