Package sample

Examples of sample.HelloWorld.sayHello()


        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null);
        node.startComposite("helloworld", "helloworld.composite");

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }

    @Test
    public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
View Full Code Here


        Map<String, List<String>> ci = node.getStartedCompositeURIs();
        Assert.assertEquals(1, ci.size());

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));

        node.stopComposite("helloworld", "helloworld.composite");
        try {
            node.getService(Helloworld.class, "HelloworldComponent");
            Assert.fail();
View Full Code Here

            // expected as there is no deployables
        }
       
        node.startComposite("helloworld", "helloworld.composite");
        helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }

    @Test
    @Ignore("Depdends on itest/T3558 which isn't in the build?")
    public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException {
View Full Code Here

        node.installContribution("store-client", "../../testing/itest/T3558/src/test/resources/sample-store-client.jar", null, null);
        node.startComposite("store", "store.composite");
        node.startComposite("store-client", "store-client.composite");

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }

    @Test
    public void testInstallNoDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
View Full Code Here

            // expected as there is no deployables
        }

        node.startComposite("helloworld", "helloworld.composite");
        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }

    @Test
    public void testGetInstalledContributions() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
View Full Code Here

        Map<String, List<String>> dcs = node.getStartedCompositeURIs();
        Assert.assertEquals(1, dcs.size());
        Assert.assertEquals("helloworld.composite", dcs.get("helloworld").get(0));

        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }

    @Test
    public void testURI() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
View Full Code Here

    }
    @Test
    public void testRunComposite() throws NoSuchServiceException {
        Node node = TuscanyRuntime.runComposite("helloworld.composite", "src/test/resources/sample-helloworld.jar");
        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }

    @Test
    public void testRunCompositeSharedRuntime() throws NoSuchServiceException {
        Node node = TuscanyRuntime.runComposite(URI.create("default"), "helloworld.composite", "src/test/resources/sample-helloworld.jar");
View Full Code Here

    @Test
    public void testRunCompositeSharedRuntime() throws NoSuchServiceException {
        Node node = TuscanyRuntime.runComposite(URI.create("default"), "helloworld.composite", "src/test/resources/sample-helloworld.jar");
        Helloworld helloworldService = node.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    }
}
View Full Code Here

        node1.startComposite("helloworld", "helloworld.composite");

        Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331");

        Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    } finally { runtime.stop(); }
    }

}
View Full Code Here

        node1.startComposite("helloworld", "helloworld.composite");

        Node node2 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44332&wka=127.0.0.1:44331");

        Helloworld helloworldService = node2.getService(Helloworld.class, "HelloworldComponent");
        Assert.assertEquals("Hello petra", helloworldService.sayHello("petra"));
    } finally { 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.