use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldJavaSystemDisabled.
@Test
public void testProcessPropertyFieldJavaSystemDisabled() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("java.specification.version");
propStrategy.setSystemPropertiesEnabled(false);
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNull(propField.getValue());
}
use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldEmptyName.
@Test
public void testProcessPropertyFieldEmptyName() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("");
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
}
use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class BaseMarshallerTest method generatePropertyReferenceMapping.
protected AtlasMapping generatePropertyReferenceMapping() {
AtlasMapping mapping = generateAtlasMapping();
PropertyField inputField = new PropertyField();
inputField.setName("foo");
Actions actions = new Actions();
actions.getActions().add(new Trim());
populateFieldComplexObject(inputField, actions, CollectionType.ARRAY, FieldStatus.SUPPORTED, FieldType.INTEGER);
populateFieldSimpleObject(inputField, 3, "docid", "/path", false, "bar");
Mapping fm = (Mapping) mapping.getMappings().getMapping().get(0);
fm.getInputField().add(inputField);
fm.getOutputField().add(inputField);
populateMapping(fm, MappingType.MAP, "MapPropertyFieldAlias", ",", ",");
populateMappingString(fm, "description", "id", "lookupTableName", "strategy", "strategyClassName");
generateProperties(mapping);
return mapping;
}
use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldMappingDefined.
@Test
public void testProcessPropertyFieldMappingDefined() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("prop-int");
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNotNull(propField.getValue());
assertTrue(propField.getValue() instanceof Integer);
assertEquals(new Integer(Integer.MIN_VALUE), new Integer((Integer) propField.getValue()));
}
use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldNotFound.
@Test
public void testProcessPropertyFieldNotFound() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("XXXXXXXXXXXXXXXXXXXXX");
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNull(propField.getValue());
}
Aggregations