Package org.apache.tuscany.container.groovy.mock

Examples of org.apache.tuscany.container.groovy.mock.Greeting


        GroovyAtomicComponent component = new GroovyAtomicComponent(configuration, null);
        ObjectFactory<?> factory = createMock(ObjectFactory.class);
        expect((String) factory.getInstance()).andReturn("bar");
        replay(factory);
        component.addPropertyFactory("property", factory);
        Greeting greeting = (Greeting) component.getServiceInstance();
        assertEquals("bar", greeting.greet("foo"));
    }
View Full Code Here


        for (OutboundInvocationChain chain : wire.getInvocationChains().values()) {
            chain.setTargetInvoker(invoker);
        }
        component.addOutboundWire(wire);
        Greeting greeting = (Greeting) component.getServiceInstance();
        assertEquals("foo", greeting.greet("foo"));
        verify(invoker);
    }
View Full Code Here

        terminateWire(wire);
        for (InboundInvocationChain chain : wire.getInvocationChains().values()) {
            chain.setTargetInvoker(component.createTargetInvoker(null, chain.getOperation()));
        }
        component.addInboundWire(wire);
        Greeting greeting = (Greeting) component.getServiceInstance("Greeting");
        assertEquals("foo", greeting.greet("foo"));
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.container.groovy.mock.Greeting

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.