Package org.apache.synapse

Examples of org.apache.synapse.TestMessageContext


        Mediator cm = MediatorFactoryFinder.getInstance().getMediator(createOMElement(
                "<class name='org.apache.synapse.mediators.ext.ClassMediatorTestMediator' " +
                        "xmlns='http://ws.apache.org/ns/synapse'/>"));
        ((ManagedLifecycle) cm).init(new Axis2SynapseEnvironment(new SynapseConfiguration()));
        assertTrue(ClassMediatorTestMediator.initialized);
        cm.mediate(new TestMessageContext());
        assertTrue(ClassMediatorTestMediator.invoked);
    }
View Full Code Here


    public void testDestroy() throws Exception {
        Mediator cm = MediatorFactoryFinder.getInstance().getMediator(createOMElement(
                "<class name='org.apache.synapse.mediators.ext.ClassMediatorTestMediator' " +
                        "xmlns='http://ws.apache.org/ns/synapse'/>"));
        cm.mediate(new TestMessageContext());
        assertTrue(ClassMediatorTestMediator.invoked);
        ((ManagedLifecycle) cm).destroy();
        assertTrue(ClassMediatorTestMediator.destroyed);
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.TestMessageContext

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.