Examples of installContribution()


Examples of org.apache.tuscany.sca.Node.installContribution()

public class TuscanyRuntimeTestCase {

    @Test
    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"));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    }

    @Test
    public void testStopStart() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        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"));
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    @Test
    @Ignore("Depdends on itest/T3558 which isn't in the build?")
    public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException {
        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"));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    @Test
    @Ignore("Depdends on itest/T3558 which isn't in the build?")
    public void testInstallWithDependent() throws NoSuchServiceException, ContributionReadException, ActivationException, ValidationException {
        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"));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    }

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

        try {
            node.getService(Helloworld.class, "HelloworldComponent");
            Assert.fail();
        } catch (NoSuchServiceException e) {
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    }

    @Test
    public void testGetInstalledContributions() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null, true);
        List<String> ics = node.getInstalledContributionURIs();
        Assert.assertEquals(1, ics.size());
        Assert.assertEquals("foo", ics.get(0));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    }

    @Test
    public void testGetDeployedCompostes() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true);
        List<String> dcs = node.getStartedCompositeURIs("foo");
        Assert.assertEquals(1, dcs.size());
        Assert.assertEquals("helloworld.composite", dcs.get(0));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    }

    @Test
    public void testRemoveComposte() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, MalformedURLException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        node.installContribution("foo", "src/test/resources/sample-helloworld.jar", null, null, true);
        node.stop("foo", "helloworld.composite");
        List<String> dcs = node.getStartedCompositeURIs("foo");
        Assert.assertEquals(0, dcs.size());
    }
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

    }

    @Test
    public void testURI() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("default");
        String uri = node.installContribution("src/test/resources/sample-helloworld.jar");
        Assert.assertEquals("sample-helloworld", uri);
    }

    @Test
    public void testStaticCreate() {
View Full Code Here

Examples of org.apache.tuscany.sca.Node.installContribution()

public class TwoNodesTestCase {

    @Test
    public void testInstallDeployable() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node1 = TuscanyRuntime.newInstance().createNode("uri:TwoNodesTestCase?multicast=off&bind=127.0.0.1:44331");
        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.