Package org.apache.synapse.util.xpath

Examples of org.apache.synapse.util.xpath.SynapseXPath.evaluate()


    public void testContextProperties() throws Exception {
        SynapseXPath xpath = new SynapseXPath("$ctx:test");
        MessageContext synCtx = new TestMessageContext();
        synCtx.setProperty("test", message);
        assertEquals(xpath.evaluate(synCtx), message);
    }

    public void testAxis2ContextProperties() throws Exception {
        Axis2MessageContext synCtx = TestUtils.getAxis2MessageContext("<test/>", null);
        synCtx.getAxis2MessageContext().setProperty("test", message);
View Full Code Here


    public void testCustomVariables() throws Exception {
        SynapseXPath xpath = new SynapseXPath("$myvar");
        SimpleVariableContext variableContext = new SimpleVariableContext();
        variableContext.setVariableValue("myvar", "myvalue");
        xpath.setVariableContext(variableContext);
        assertEquals("myvalue", xpath.evaluate(TestUtils.getTestContext("<test/>")));
    }
}
View Full Code Here

    public void testContextProperties() throws Exception {
        SynapseXPath xpath = new SynapseXPath("$ctx:test");
        MessageContext synCtx = new TestMessageContext();
        synCtx.setProperty("test", message);
        assertEquals(xpath.evaluate(synCtx), message);
    }

    public void testAxis2ContextProperties() throws Exception {
        Axis2MessageContext synCtx = TestUtils.getAxis2MessageContext("<test/>", null);
        synCtx.getAxis2MessageContext().setProperty("test", message);
View Full Code Here

    public void testCustomVariables() throws Exception {
        SynapseXPath xpath = new SynapseXPath("$myvar");
        SimpleVariableContext variableContext = new SimpleVariableContext();
        variableContext.setVariableValue("myvar", "myvalue");
        xpath.setVariableContext(variableContext);
        assertEquals("myvalue", xpath.evaluate(TestUtils.getTestContext("<test/>")));
    }
}
View Full Code Here

    public void testContextProperties() throws Exception {
        SynapseXPath xpath = new SynapseXPath("$ctx:test");
        MessageContext synCtx = new TestMessageContext();
        synCtx.setProperty("test", message);
        assertEquals(xpath.evaluate(synCtx), message);
    }

    public void testAxis2ContextProperties() throws Exception {
        HashMap props = new HashMap();
        Axis2MessageContext synCtx = TestUtils.getAxis2MessageContext("<test/>", props);
View Full Code Here

    public void testCustomVariables() throws Exception {
        SynapseXPath xpath = new SynapseXPath("$myvar");
        SimpleVariableContext variableContext = new SimpleVariableContext();
        variableContext.setVariableValue("myvar", "myvalue");
        xpath.setVariableContext(variableContext);
        assertEquals("myvalue", xpath.evaluate(TestUtils.getTestContext("<test/>")));
    }
}
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.