use of io.atlasmap.v2.PropertyField 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.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldRuntime.
@Test
public void testProcessPropertyFieldRuntime() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("key-float");
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNotNull(propField.getValue());
assertTrue(propField.getValue() instanceof Float);
assertEquals(new Float(Float.MAX_VALUE), new Float((Float) propField.getValue()));
}
use of io.atlasmap.v2.PropertyField 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.PropertyField in project atlasmap by atlasmap.
the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldMappingDefinedDisabled.
@Test
public void testProcessPropertyFieldMappingDefinedDisabled() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("prop-int");
propStrategy.setMappingDefinedPropertiesEnabled(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 testProcessPropertyFieldEnvironmentDisabled.
@Test
public void testProcessPropertyFieldEnvironmentDisabled() throws Exception {
PropertyField propField = AtlasModelFactory.createPropertyField();
propField.setName("PATH");
propStrategy.setEnvironmentPropertiesEnabled(false);
propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
assertNotNull(propField);
assertNull(propField.getValue());
}
Aggregations