Examples of TransformationDescription


Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getBlubB(), is("test3#test4"));
    }

    @Test
    public void testSplitTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelBToModelA();
        desc.forwardField("idB", "idA");
        desc.forwardField("testB", "testA");
        desc.splitField("blubB", "blubA", "#", "0");
        desc.splitField("blubB", "blaA", "#", "1");
        installTransformation(desc);

        ModelB model = new ModelB();
        model.setIdB("test1");
        model.setTestB("test2");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getBlaA(), is("test4"));
    }

    @Test
    public void testSplitRegexTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelBToModelA();
        desc.splitRegexField("blubB", "blubA", "[^#]+", "0");
        desc.splitRegexField("blubB", "blaA", "[^#]+", "1");
        installTransformation(desc);

        ModelB model = new ModelB();
        model.setBlubB("test3#test4");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getBlaA(), is("test4"));
    }

    @Test
    public void testMapTransformation_shoulWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelBToModelA();
        desc.forwardField("idB", "idA");
        desc.forwardField("testB", "testA");
        Map<String, String> mapping = new HashMap<String, String>();
        mapping.put("hello", "world");
        mapping.put("dog", "cat");
        desc.mapField("blubB", "blubA", mapping);
        installTransformation(desc);

        ModelB model1 = new ModelB();
        model1.setIdB("test1");
        model1.setTestB("test2");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result2.getBlubA(), is("cat"));
    }

    @Test
    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");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getIdB(), is("this"));
    }

    @Test
    public void testValueTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelAToModelB();
        desc.forwardField("idA", "idB");
        desc.valueField("testB", "blub");
        installTransformation(desc);

        ModelA model = new ModelA();
        model.setIdA("this is a test");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getTestB(), is("blub"));
    }

    @Test
    public void testLengthTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelBToModelA();
        desc.lengthField("testB", "testA", null);
        desc.lengthField("elements", "blubA", "size");
        installTransformation(desc);

        ModelB model = new ModelB();
        model.setTestB("Hello");
        List<String> elements = new ArrayList<String>();
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getBlubA(), is(model.getElements().size() + ""));
    }

    @Test
    public void testTrimTransformation_shouldWork() throws Exception {
        TransformationDescription desc = getDescriptionForModelBToModelA();
        desc.trimField("testB", "testA");
        installTransformation(desc);

        ModelB model = new ModelB();
        model.setTestB("       Hello      ");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getTestA(), is("Hello"));
    }

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

        ModelA model = new ModelA();
        model.setTestA("hello");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getTestB(), is("HELLO"));
    }

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

        ModelA model = new ModelA();
        model.setTestA("HELLO");
View Full Code Here

Examples of org.openengsb.core.ekb.api.transformation.TransformationDescription

        assertThat(result.getTestB(), is("hello"));
    }

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

        ModelA model = new ModelA();
        model.setTestA("testHellotest");
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.