Examples of sayHello()


Examples of sample.HelloWorld.sayHello()

    @Test
    public void testSayHello() {
        NodeFactory nf = NodeFactory.newInstance();
        Node node = nf.createNode((String)null, new String[] {"target/classes"}).start();
        HelloWorld hw = node.getService(HelloWorld.class, "HelloWorld");
        assertEquals("Hello There", hw.sayHello("There"));
      node.stop();
    }

}
View Full Code Here

Examples of sample.Helloworld.sayHello()

    public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true);

        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

Examples of sample.Helloworld.sayHello()

        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true);
        String ci = node.getStartedCompositeURIs("helloworld").get(0);

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

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

Examples of sample.Helloworld.sayHello()

            // expected as there is no deployables
        }
       
        node.start("helloworld", ci);
        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

Examples of sample.Helloworld.sayHello()

        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("store", "../../itest/T3558/src/test/resources/sample-store.jar", null, null, true);
        node.installContribution("store-client", "../../itest/T3558/src/test/resources/sample-store-client.jar", null, null, true);

        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

Examples of sample.Helloworld.sayHello()

            // expected as there is no deployables
        }

        node.start("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

Examples of sample.Helloworld.sayHello()

        List<String> dcs = node.getStartedCompositeURIs("helloworld");
        Assert.assertEquals(1, dcs.size());
        Assert.assertEquals("helloworld.composite", dcs.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

Examples of sample.Helloworld.sayHello()

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

Examples of sample.Helloworld.sayHello()

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

Examples of sample.Helloworld.sayHello()

        node1.installContribution("helloworld", "src/test/resources/sample-helloworld.jar", null, null, true);

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

}
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.