Package org.openengsb.core.ekb.transformation.wonderland.models

Examples of org.openengsb.core.ekb.transformation.wonderland.models.ModelA


        desc.forwardField("idA", "idB");
        desc.forwardField("testA", "testB");
        desc.forwardField("blubA", "blubB");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("test1");
        model.setTestA("test2");
        model.setBlubA("test3");

        ModelB result = transformModelAToModelB(model);

        assertThat(result.getIdB(), is("test1"));
        assertThat(result.getTestB(), is("test2"));
View Full Code Here


        desc.forwardField("testA", "testB");
        desc.forwardField("blubA", "#test");
        desc.forwardField("#test", "blubB");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("test1");
        model.setTestA("test2");
        model.setBlubA("test3");

        ModelB result = transformModelAToModelB(model);

        assertThat(result.getIdB(), is("test1"));
        assertThat(result.getTestB(), is("test2"));
View Full Code Here

        desc.forwardField("idA", "testB");
        desc.forwardField("testA", "blubB");
        desc.forwardField("blubA", "idB");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("test1");
        model.setTestA("test2");
        model.setBlubA("test3");

        ModelB result = transformModelAToModelB(model);
        assertThat(result.getIdB(), is("test3"));
        assertThat(result.getTestB(), is("test1"));
        assertThat(result.getBlubB(), is("test2"));
View Full Code Here

        desc.forwardField("idA", "idB");
        desc.forwardField("testA", "testB");
        desc.concatField("blubB", "#", "blubA", "blaA");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("test1");
        model.setTestA("test2");
        model.setBlubA("test3");
        model.setBlaA("test4");

        ModelB result = transformModelAToModelB(model);
        assertThat(result.getIdB(), is("test1"));
        assertThat(result.getTestB(), is("test2"));
        assertThat(result.getBlubB(), is("test3#test4"));
View Full Code Here

        ModelB model = new ModelB();
        model.setIdB("test1");
        model.setTestB("test2");
        model.setBlubB("test3#test4");

        ModelA result = transformModelBToModelA(model);
        assertThat(result.getIdA(), is("test1"));
        assertThat(result.getTestA(), is("test2"));
        assertThat(result.getBlubA(), is("test3"));
        assertThat(result.getBlaA(), is("test4"));
    }
View Full Code Here

        installTransformation(desc);

        ModelB model = new ModelB();
        model.setBlubB("test3#test4");

        ModelA result = transformModelBToModelA(model);
        assertThat(result.getBlubA(), is("test3"));
        assertThat(result.getBlaA(), is("test4"));
    }
View Full Code Here

        ModelB model2 = new ModelB();
        model2.setIdB("test1");
        model2.setTestB("test2");
        model2.setBlubB("dog");

        ModelA result1 = transformModelBToModelA(model1);
        ModelA result2 = transformModelBToModelA(model2);

        assertThat(result1.getBlubA(), is("world"));
        assertThat(result2.getBlubA(), is("cat"));
    }
View Full Code Here

    public void testSubStringTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.substringField("idA", "idB", "0", "4");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("this is a test");

        ModelB result = transformModelAToModelB(model);
        assertThat(result.getIdB(), is("this"));
    }
View Full Code Here

        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.forwardField("idA", "idB");
        desc.valueField("testB", "blub");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("this is a test");

        ModelB result = transformModelAToModelB(model);
        assertThat(result.getIdB(), is("this is a test"));
        assertThat(result.getTestB(), is("blub"));
    }
View Full Code Here

        elements.add("A");
        elements.add("B");
        elements.add("C");
        model.setElements(elements);

        ModelA result = transformModelBToModelA(model);
        assertThat(result.getTestA(), is(model.getTestB().length() + ""));
        assertThat(result.getBlubA(), is(model.getElements().size() + ""));
    }
View Full Code Here

TOP

Related Classes of org.openengsb.core.ekb.transformation.wonderland.models.ModelA

Copyright © 2018 www.massapicom. 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.