Examples of validateContribution()


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

    @Test
    public void validValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
        node.installContribution("src/test/resources/sample-helloworld.jar");
        node.validateContribution("sample-helloworld");
    }

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

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

    @Test
    public void invalidValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
        node.installContribution("src/test/resources/import.jar");
        try {
            node.validateContribution("import");
        } catch (ValidationException e) {
            Assert.assertTrue(e.getMessage().endsWith("Unresolved import: Import = sample"));           
        }
    }
View Full Code Here

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

    @Test
    public void importExportValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
        node.installContribution("src/test/resources/import.jar");
        try {
            node.validateContribution("import");
        } catch (ValidationException e) {
            // expected
        }
        node.installContribution("src/test/resources/export.jar");
        node.validateContribution("import");
View Full Code Here

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

            node.validateContribution("import");
        } catch (ValidationException e) {
            // expected
        }
        node.installContribution("src/test/resources/export.jar");
        node.validateContribution("import");
        node.startComposite("import", "helloworld.composite");
        Map<String, List<String>> scs = node.getStartedCompositeURIs();
        Assert.assertEquals(1, scs.size());           
    }
View Full Code Here

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

        TuscanyRuntime runtime = TuscanyRuntime.newInstance();
        try {
            Node nodeA = runtime.createNode("uri:ImportTestCase");
            nodeA.installContribution("src/test/resources/import.jar");
            try {
                nodeA.validateContribution("import");
            } catch (ValidationException e) {
                // expected
            }
            Node nodeB =runtime.createNode("uri:ImportTestCase");
            nodeB.installContribution("src/test/resources/export.jar");
View Full Code Here

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

    public void testInstallDeployable() throws ContributionReadException, ValidationException, ActivationException {
        Node node = TuscanyRuntime.newInstance().createNode();
        String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
        Contribution contribution = node.getContribution(curi);
        Assert.assertNull(contribution.getClassLoader());
        node.validateContribution(curi);
        ClassLoader cl1 = contribution.getClassLoader();
        Assert.assertNotNull(cl1);
        node.startComposite(curi, "helloworld.composite");
        Assert.assertEquals(cl1, node.getContribution(curi).getClassLoader());
    }
View Full Code Here

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

    @Test
    public void testArtifacts() throws ContributionReadException, ValidationException {

        Node node = TuscanyRuntime.newInstance().createNode();
        String curi = node.installContribution("src/test/resources/sample-helloworld.jar");
        node.validateContribution(curi);

        Contribution contribution = node.getContribution(curi);
        Composite composite = contribution.getArtifactModel("helloworld.composite");
        Component component = composite.getComponents().get(0);
        Service service = component.getImplementation().getServices().get(0);
View Full Code Here

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

    @Test
    public void validValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
        node.installContribution("src/test/resources/sample-helloworld.jar");
        node.validateContribution("sample-helloworld");
    }

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

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

    @Test
    public void invalidValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
        node.installContribution("src/test/resources/import.jar");
        try {
            node.validateContribution("import");
        } catch (ValidationException e) {
            Assert.assertTrue(e.getMessage().endsWith("Unresolved import: Import = sample"));           
        }
    }
View Full Code Here

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

    @Test
    public void importExportValidate() throws NoSuchServiceException, NoSuchDomainException, ContributionReadException, ActivationException, ValidationException {
        Node node = TuscanyRuntime.newInstance().createNode("ImportTestCase");
        node.installContribution("src/test/resources/import.jar");
        try {
            node.validateContribution("import");
        } catch (ValidationException e) {
            // expected
        }
        node.installContribution("src/test/resources/export.jar");
        node.validateContribution("import");
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.