Package org.apache.tuscany.container.java.invocation.mock

Examples of org.apache.tuscany.container.java.invocation.mock.SimpleTargetImpl


        targetFactory.setConfiguration(targetConfig);
        targetFactory.setBusinessInterface(SimpleTarget.class);

        // bootstrap a scope container with the target in it
        Map<String,Object> instances = new HashMap<String,Object>();
        SimpleTarget simpleTarget = new SimpleTargetImpl();
        instances.put("target",simpleTarget);
        MockScopeContext scopeCtx = new MockScopeContext(instances);

        // connect the source to the target
        DefaultWireBuilder builder = new DefaultWireBuilder();
View Full Code Here


    public void setUp() throws Exception {
        hello = Hello.class.getMethod("hello", String.class);
    }

    public void testMediation() throws Exception {
        StaticJavaComponentTargetInvoker invoker = new StaticJavaComponentTargetInvoker(hello, new SimpleTargetImpl());
        Message msg = msgFactory.createMessage();
        msg.setBody("foo");
        Assert.assertEquals("foo", invoker.invoke(msg).getBody());
    }
View Full Code Here

    Map<String, Object> components;

    public MockScopeContext() {
        components = new HashMap<String, Object>();
        components.put("foo", new SimpleTargetImpl());
        components.put("bar", new SimpleTargetImpl());
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.container.java.invocation.mock.SimpleTargetImpl

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.