Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCANodeFactory.createSCANode()


     * and reference injection is complete.
     */
    @Test
    public void atInitProper() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(),
                new SCAContribution("TestContribution",
                                    new File("src/main/resources/proper").toURL().toString()));
        node.start();
        AService aService = ((SCAClient)node).getService(AService.class, "AComponent");
        Assert.assertTrue(aService.isInitProper());
View Full Code Here


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

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

     */
    @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) {
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) {
View Full Code Here

    private SCANode node;

    @Override
    protected void setUp() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANode(new File("src/test/resources/Calculator.composite").toURL().toString(),
                                         new SCAContribution("TestContribution",
                                                             new File("src/test/resources").toURL().toString()));
        node.start();
        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
    }
View Full Code Here

    @Test
    public void testNodeWithRelativeCompositeURIAndNoContribution() {
        SCANodeFactory factory = new NodeFactoryImpl();
        String compositeURI = "HelloWorld.composite";
        SCANode node = factory.createSCANode(compositeURI, new SCAContribution[0]);
        testNode(node);
    }

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

    private SCANode node;

    @Override
    protected void setUp() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANode(new File("src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite").toURL().toString(),
                             new SCAContribution("TestContribution",
                                                 new File("src/main/resources/ComponentReferenceTargetNotFound").toURL().toString()));
       
        try {
            node.start();
View Full Code Here

    private SCANode node;

    @Override
    protected void setUp() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANode(new File("src/main/resources/DuplicatePropertyName/Calculator.composite").toURL().toString(),
                             new SCAContribution("TestContribution",
                                                 new File("src/main/resources/DuplicatePropertyName").toURL().toString()));
        node.start();
        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
    }
View Full Code Here

    private SCANode node;

    @Override
    protected void setUp() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANode(new File("src/main/resources/MultipleBindingsForService/Calculator.composite").toURL().toString(),
                             new SCAContribution("TestContribution",
                                                 new File("src/main/resources/MultipleBindingsForService").toURL().toString()));
        node.start();
        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
    }
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.