Search in sources :

Example 21 with PropertyField

use of io.atlasmap.v2.PropertyField in project atlasmap by atlasmap.

the class DefaultAtlasPropertyStrategyTest method testProcessPropertyFieldJavaSystem.

@Test
public void testProcessPropertyFieldJavaSystem() throws Exception {
    PropertyField propField = AtlasModelFactory.createPropertyField();
    propField.setName("java.specification.version");
    propStrategy.processPropertyField(AtlasTestData.generateAtlasMapping(), propField, AtlasTestData.generateRuntimeProperties());
    assertNotNull(propField);
    assertNotNull(propField.getValue());
    assertTrue(propField.getValue() instanceof String);
    assertEquals("1.8", propField.getValue());
}
Also used : PropertyField(io.atlasmap.v2.PropertyField) Test(org.junit.Test)

Example 22 with PropertyField

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");
    Mapping fm = (Mapping) mapping.getMappings().getMapping().get(0);
    fm.getInputField().add(inputField);
    Property p = new Property();
    p.setName("foo");
    p.setValue("bar");
    mapping.setProperties(new Properties());
    mapping.getProperties().getProperty().add(p);
    return mapping;
}
Also used : AtlasMapping(io.atlasmap.v2.AtlasMapping) PropertyField(io.atlasmap.v2.PropertyField) Mapping(io.atlasmap.v2.Mapping) AtlasMapping(io.atlasmap.v2.AtlasMapping) Properties(io.atlasmap.v2.Properties) Property(io.atlasmap.v2.Property)

Aggregations

PropertyField (io.atlasmap.v2.PropertyField)22 Test (org.junit.Test)20 AtlasMapping (io.atlasmap.v2.AtlasMapping)5 Mapping (io.atlasmap.v2.Mapping)2 AtlasInternalSession (io.atlasmap.spi.AtlasInternalSession)1 Head (io.atlasmap.spi.AtlasInternalSession.Head)1 Actions (io.atlasmap.v2.Actions)1 Properties (io.atlasmap.v2.Properties)1 Property (io.atlasmap.v2.Property)1 Trim (io.atlasmap.v2.Trim)1