Examples of instantiateField()


Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription.instantiateField()

    }

    @Test
    public void testInstantiate_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.instantiateField("intValue", Integer.class.getName(), "parseInt", "idA");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("42");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription.instantiateField()

    }

    @Test
    public void testInitiateWithNoParameters_shouldCreateInstance() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.instantiateField("elements", ArrayList.class.getName(), null);
        installTransformation(desc);
        ModelA model = new ModelA();
        ModelB result = transformModelAToModelB(model);
        assertThat(result.getElements(), notNullValue());
    }
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription.instantiateField()

    }
   
    @Test
    public void testInitiateWithParameters_shouldCreateInstance() throws Exception {
        TransformationDescription desc = getDescriptionForModelBToModelA();
        desc.instantiateField("nested", NestedObject.class.getName(), null, "testB", "blubB");
        installTransformation(desc);
        ModelB model = new ModelB();
        model.setTestB("testvalue1");
        model.setBlubB("testvalue2");
        ModelA result = transformModelBToModelA(model);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.