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

Examples of org.apache.tuscany.container.java.assembly.mock.HelloWorldService.hello()


        child.registerModelObject(MockFactory.createModuleWithEntryPointToExternalService());
        child.publish(new ModuleStart(this));
        Object id = new Object();
        child.publish(new RequestStart(this, id));
        HelloWorldService service1 = (HelloWorldService) child.getContext("target").getInstance(null);
        Assert.assertEquals("foo", service1.hello("foo"));

        child.publish(new RequestEnd(this, id));
        child.publish(new ModuleStop(this));
        runtime.stop();
View Full Code Here


        child.registerModelObject(MockFactory.createModuleWithExternalService());
        child.publish(new ModuleStart(this));
        HelloWorldService source = (HelloWorldService) child.getContext("source").getInstance(null);
        Assert.assertNotNull(source);
        Assert.assertEquals(0, mockInterceptor.getCount());
        Assert.assertEquals("foo", source.hello("foo"));
        Assert.assertEquals(1, mockInterceptor.getCount());
        child.publish(new ModuleStop(this));
        runtime.stop();
    }
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.