Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCAContribution


    @Test
    public void atInitNonVoidReturnType() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        try {
            SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err3/HelloWorldErr3.composite").toURL().toString(),
                    new SCAContribution("TestContribution",
                                        new File("src/main/resources/err3").toURL().toString()));
            Assert.fail();
            node.stop();
        } catch(ServiceRuntimeException e) {
            //expected
View Full Code Here


    @Test
    public void atInitMethodWithArgs() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        try {
            SCANode node = nodeFactory.createSCANode(new File("src/main/resources/err4/HelloWorldErr4.composite").toURL().toString(),
                    new SCAContribution("TestContribution",
                                        new File("src/main/resources/err4").toURL().toString()));
            Assert.fail();
            node.stop();
        } catch(ServiceRuntimeException e) {
            //expected
View Full Code Here

    private Contribution getContribution(URL contributionArtifactURL, String contributionArtifactPath) {
        URL contributionURL = getContributionURL(contributionArtifactURL, contributionArtifactPath);

        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);

        SCAContribution contribution = new SCAContribution(contributionURL.toString(), contributionURL.toString());
        Contribution c = createContribution(contributionFactory, contribution);
        return c;
    }
View Full Code Here

                        throw new IllegalArgumentException("Contribution " + name + " cannot be located.");
                    }
                }
            }
        }
        return new SCAContribution(name, file.toURI().toString());
    }
View Full Code Here

     * @param name The name of the contribution archive
     * @return The SCAContribution
     */
    public static SCAContribution locate(String urlPattern, String name) {
        String url = urlPattern.replace("${name}", name);
        return new SCAContribution(name, url);
    }
View Full Code Here

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        emailGatewayNode =
            SCANodeFactory.newInstance().createSCANode("emailgateway.composite",
                                                       new SCAContribution("emailgateway",
                                                                           "../emailgateway/target/classes"),
                                                       new SCAContribution("emailgateway-test",
                                                                           "../emailgateway/target/test-classes"));

        emailGatewayNode.start();

        paymentNode =
            SCANodeFactory.newInstance().createSCANode(null,
                                                       new SCAContribution("payment-groovy", "./target/classes"),
                                                       new SCAContribution("payment-groovy-test",
                                                                           "./target/test-classes"));

        paymentNode.start();
    }
View Full Code Here

    private SCANode node;

    @Before
    public void startServer() throws Exception {
        node = SCANodeFactory.newInstance().createSCANode("tours-impl-include.composite",
                   new SCAContribution("introducing-trips", "../introducing-trips/target/classes"),
                   new SCAContribution("buildingblocks", "./target/classes"));
        node.start();
    }
View Full Code Here

    private SCANode node;

    @Before
    public void startServer() throws Exception {
        node = SCANodeFactory.newInstance().createSCANode("tours-impl.composite",
                   new SCAContribution("buildingblocks", "./target/classes"));
        node.start();
    }
View Full Code Here

     */
    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        try {
            node =
                SCANodeFactory.newInstance().createSCANode(null, new SCAContribution("creditcard", "./target/classes"));

            node.start();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
View Full Code Here

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        node =
            SCANodeFactory.newInstance()
                .createSCANode(null,
                               new SCAContribution("payment", "./target/classes"));
        node.start();
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.SCAContribution

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.