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

Examples of org.apache.tuscany.container.groovy.mock.Greeting.greet()


        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"));
    }

    @SuppressWarnings("unchecked")
    protected void setUp() throws Exception {
        super.setUp();
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);
    }

    // todo this could be generalized and moved to test module
    public static Message eqMessage() {
View Full Code Here

        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"));
    }

    protected void setUp() throws Exception {
        super.setUp();
        GroovyClassLoader cl = new GroovyClassLoader(getClass().getClassLoader());
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.