Examples of ModelA


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

        installTransformation(desc);

        ModelB model = new ModelB();
        model.setTestB("       Hello      ");

        ModelA result = transformModelBToModelA(model);
        assertThat(result.getTestA(), is("Hello"));
    }
View Full Code Here

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

    public void testToUpperTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.toUpperField("testA", "testB");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setTestA("hello");

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

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

    public void testToLowerTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.toLowerField("testA", "testB");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setTestA("HELLO");

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

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

    public void testReplaceTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.replaceField("testA", "testB", "test", "blub");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setTestA("testHellotest");

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

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

    public void testReverseTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.reverseField("testA", "testB");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setTestA("This is a teststring");

        ModelB result = transformModelAToModelB(model);
        assertThat(result.getTestB(), is("gnirtstset a si sihT"));
    }
View Full Code Here

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

        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.padField("idA", "idB", "4", "0", "Start");
        desc.padField("testA", "testB", "7", "!", "End");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("1");
        model.setTestA("works?");

        ModelB result = transformModelAToModelB(model);
        assertThat(result.getIdB(), is("0001"));
        assertThat(result.getTestB(), is("works?!"));
    }
View Full Code Here

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

        ModelB model = new ModelB();
        model.setIdB("#?##blub");
        model.setTestB("##blub");
        model.setBlubB("#?#?#?test");

        ModelA result = transformModelBToModelA(model);

        assertThat(result.getIdA(), is("#blub"));
        assertThat(result.getTestA(), is("blub"));
        assertThat(result.getBlubA(), is("test"));
        assertThat(result.getBlaA(), is("?#?#?test"));
    }
View Full Code Here

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

    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");

        ModelB result = transformModelAToModelB(model);

        assertThat(result.getIntValue(), is(42));
    }
View Full Code Here

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

    @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.transformation.wonderland.models.ModelA

        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);
        assertThat(result.getNested(), notNullValue());
        assertThat(result.getNested().getValue1(), is(model.getTestB()));
        assertThat(result.getNested().getValue2(), is(model.getBlubB()));
    }
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.