use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldMappingDefinedEmptyRuntime.
@Test
public void testProcessPropertyFieldMappingDefinedEmptyRuntime() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("prop-int");
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, new HashMap<String, Object>());
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 testProcessPropertyFieldMappingDefinedEmptyProperties.
@Test
public void testProcessPropertyFieldMappingDefinedEmptyProperties() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("prop-int");
AtlasMapping mapping = AtlasTestData.generateAtlasMapping();
mapping.getProperties().getProperty().clear();
propStrategy.processPropertyField(mapping, propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNull(propField.getValue());
}
use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldRuntimeDisabled.
@Test
public void testProcessPropertyFieldRuntimeDisabled() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("key-float");
propStrategy.setRuntimePropertiesEnabled(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 testProcessPropertyFieldDuplicateDefaultOrdering.
@Test
public void testProcessPropertyFieldDuplicateDefaultOrdering() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("dupe-string");
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNotNull(propField.getValue());
assertTrue(propField.getValue() instanceof String);
assertEquals("uh oh", propField.getValue());
}
use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldEnvironment.
@Test
public void testProcessPropertyFieldEnvironment() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("PATH");
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNotNull(propField.getValue());
assertTrue(propField.getValue() instanceof String);
assertTrue(((String) propField.getValue()).contains(File.pathSeparator));
}
Aggregations