Package org.apache.tuscany.core.client

Examples of org.apache.tuscany.core.client.TuscanyRuntime


*/
public class StartStopTestCase extends TestCase {
    private ClassLoader oldCL;

    public void testHelloWorld() throws Exception {
        TuscanyRuntime tuscany = new TuscanyRuntime("test", null);
        tuscany.start();
        ModuleContext moduleContext = CurrentModuleContext.getContext();
        assertNotNull(moduleContext);

        HelloWorldService helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorld");
        assertNotNull(helloworldService);

        String value = helloworldService .getGreetings("World");
        assertEquals("Hello World", value);
        tuscany.stop();
        tuscany = new TuscanyRuntime("test", null);
        tuscany.start();
        moduleContext = CurrentModuleContext.getContext();
        assertNotNull(moduleContext);
        helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorld");
        assertNotNull(helloworldService);
        value = helloworldService .getGreetings("World");
        assertEquals("Hello World", value);
        tuscany.stop();
    }
View Full Code Here


   
    protected void setUp() throws Exception {
        super.setUp();
       
        // Create a Tuscany runtime for the sample module component
        tuscany = new TuscanyRuntime("HelloWorldModuleComponent", null);

        // Start the Tuscany runtime and associate it with this thread
        tuscany.start();
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.client.TuscanyRuntime

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.