Package itest

Examples of itest.HelloworldService


    public void testExplicit() throws Exception {
        node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
        node.start();

        SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
        HelloworldService service = clientFactory.getService(HelloworldService.class, "HelloworldComponent/HelloworldService");
        assertEquals("Hello petra", service.sayHello("petra"));
       
        RemoteHelloworldService remoteService = clientFactory.getService(RemoteHelloworldService.class, "HelloworldComponent/RemoteHelloworldService");
        assertEquals("Hello petra", remoteService.sayHelloRemote("petra"));
        assertEquals("Hello petra", service.sayHello("petra"));
    }
View Full Code Here


    public void testWithoutServiceNameSingleService() throws Exception {
        node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
        node.start();

        SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
        HelloworldService service = clientFactory.getService(HelloworldService.class, "SingleServiceComponent");
        assertEquals("Hello petra", service.sayHello("petra"));
    }
View Full Code Here

        SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("myFooDomain"));
       
        // test multiple service error reported at the SCAClient wire
        try {
            HelloworldService service = clientFactory.getService(HelloworldService.class, "MultipleServiceComponent");
            assertEquals("Hello petra", service.sayHello("petra"));
            fail();
        } catch (ServiceRuntimeException e) {
            // expected
        }  
       
        // test multiple service error reported at the wire associated with a reference of
        // the component the SCAClient is talking to
        HelloworldService service = clientFactory.getService(HelloworldService.class, "MultipleServiceClientComponent");
       
        try {
            assertEquals("Hello Hello again petra", service.sayHello("petra"));
            fail();
        } catch (ServiceRuntimeException e) {
            // expected
       
    }   
View Full Code Here

public class SCAClientTestCase extends TestCase {

    @Test
    public void testDefault() throws Exception {
        SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("uri:default?wka=127.0.0.1:9876"));
        HelloworldService service = clientFactory.getService(HelloworldService.class, "HelloworldComponent");
        assertEquals("Hello petra", service.sayHello("petra"));
    }
View Full Code Here

TOP

Related Classes of itest.HelloworldService

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.