Examples of mapTo()


Examples of com.alibaba.citrus.service.form.support.FormTool.GroupInstanceHelper.mapTo()

        obj.setProperty1("aaa");
        obj.setField2(456);

        // new form
        GroupInstanceHelper group = tool.get("group1").getDefaultInstance();
        group.mapTo(obj);

        assertEquals("aaa", group.get("field1").getValue());
        assertEquals("456", group.get("field2").getValue());

        // submit form
View Full Code Here

Examples of com.alibaba.citrus.service.form.support.FormTool.GroupInstanceHelper.mapTo()

        // submit form
        submitForm();

        group = tool.get("group1").getDefaultInstance();
        group.mapTo(obj); // 对validated group无效果

        assertEquals("aa", group.get("field1").getValue());
        assertEquals("", group.get("field2").getValue());
    }
View Full Code Here

Examples of org.apache.fulcrum.yaafi.framework.context.YaafiToAvalonContextMapper.mapTo()

            );

        RoleEntry roleEntry = serviceComponent.getRoleEntry();
        String componentFlavour = roleEntry.getComponentFlavour();

        DefaultContext serviceComponentContext = mapper.mapTo(
            this.getContext(),
            componentFlavour
            );

        // create the remaining Avalon artifacts for the service component
View Full Code Here

Examples of org.apache.fulcrum.yaafi.framework.context.YaafiToAvalonContextMapper.mapTo()

            );

        RoleEntry roleEntry = serviceComponent.getRoleEntry();
        String componentFlavour = roleEntry.getComponentFlavour();

        DefaultContext serviceComponentContext = mapper.mapTo(
            this.getContext(),
            componentFlavour
            );

        // add the read/write lock to the context
View Full Code Here

Examples of org.switchyard.component.soap.composer.SOAPContextMapper.mapTo()

        Assert.assertEquals("John", getPropertyValue(targetContext, FIRST_NAME));
        Assert.assertEquals("Doe", getPropertyValue(targetContext, LAST_NAME));
        // test mapTo
        Context sourceContext = newSourceContext();
        SOAPMessage targetMessage = newTargetMessage();
        mapper.mapTo(sourceContext, new SOAPBindingData(targetMessage));
        Assert.assertEquals("John", getChildElement(targetMessage, FIRST_NAME).getTextContent());
        Assert.assertEquals("Doe", getChildElement(targetMessage, LAST_NAME).getTextContent());
    }

    @Test
View Full Code Here

Examples of org.switchyard.component.soap.composer.SOAPContextMapper.mapTo()

        Assert.assertEquals("<first xmlns=\"urn:names:1.0\">John</first>", getPropertyValue(targetContext, FIRST_NAME));
        Assert.assertEquals("<last xmlns=\"urn:names:1.0\">Doe</last>", getPropertyValue(targetContext, LAST_NAME));
        // test mapTo
        Context sourceContext = newSourceContext();
        SOAPMessage targetMessage = newTargetMessage();
        mapper.mapTo(sourceContext, new SOAPBindingData(targetMessage));
        Assert.assertEquals("John", getChildElement(targetMessage, FIRST_NAME).getTextContent());
        Assert.assertEquals("Doe", getChildElement(targetMessage, LAST_NAME).getTextContent());
    }

    @Test
View Full Code Here

Examples of org.switchyard.component.soap.composer.SOAPContextMapper.mapTo()

        Assert.assertEquals(newConfiguration("<first xmlns=\"urn:names:1.0\">John</first>"), getPropertyValue(targetContext, FIRST_NAME));
        Assert.assertEquals(newConfiguration("<last xmlns=\"urn:names:1.0\">Doe</last>"), getPropertyValue(targetContext, LAST_NAME));
        // test mapTo
        Context sourceContext = newSourceContext();
        SOAPMessage targetMessage = newTargetMessage();
        mapper.mapTo(sourceContext, new SOAPBindingData(targetMessage));
        Assert.assertEquals("John", getChildElement(targetMessage, FIRST_NAME).getTextContent());
        Assert.assertEquals("Doe", getChildElement(targetMessage, LAST_NAME).getTextContent());
    }

    @Test
View Full Code Here

Examples of org.switchyard.component.soap.composer.SOAPContextMapper.mapTo()

        Assert.assertEquals("<first xmlns=\"urn:names:1.0\">John</first>", toString((Element)getPropertyValue(targetContext, FIRST_NAME)));
        Assert.assertEquals("<last xmlns=\"urn:names:1.0\">Doe</last>", toString((Element)getPropertyValue(targetContext, LAST_NAME)));
        // test mapTo
        Context sourceContext = newSourceContext();
        SOAPMessage targetMesssage = newTargetMessage();
        mapper.mapTo(sourceContext, new SOAPBindingData(targetMesssage));
        Assert.assertEquals("John", getChildElement(targetMesssage, FIRST_NAME).getTextContent());
        Assert.assertEquals("Doe", getChildElement(targetMesssage, LAST_NAME).getTextContent());
    }

}
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.