Package itest.nodes

Examples of itest.nodes.Helloworld.sayHello()


        assertNotNull(scaClientService);
        assertEquals("Hello Petra", scaClientService.sayHello("Petra"));

        Helloworld scaClientClient = SCAClientFactory.newInstance(URI.create("TwoRemoteNodesTestCase")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(scaClientClient);
        assertEquals("Hi Hello Petra", scaClientClient.sayHello("Petra"));
   
    }

    @AfterClass
    public static void tearDownAfterClass() throws Exception {
View Full Code Here


        // Sleep 3 seconds so that the endpoint is populated into the EndpointRegistry
        //Thread.sleep(3000);
       
        Helloworld service = factory.getService(Helloworld.class, "HelloworldService");
       
        String response = service.sayHello("test");
        if (response == null || !response.equals("Hello test")){
            throw new Exception("Test failed - expecting 'Hello test' got " + response);
        } else {
            System.out.println("Test success - " + response);
        }
View Full Code Here

    @Test
    public void testService() throws Exception {
        Helloworld service = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldService");
        assertNotNull(service);
        assertEquals("Hello Petra", service.sayHello("Petra"));
    }

    @Test
    public void testClient() throws Exception {
        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
View Full Code Here

    @Test
    public void testClient() throws Exception {
        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
        assertEquals("Hi Hello Petra", client.sayHello("Petra"));
    }
   
    @Test
    public void testRemovingServiceContribution() throws Exception {
        domain.removeContribution(serviceContributionUri);
View Full Code Here

        }

        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
        try {
            assertEquals("Hi Hello Petra", client.sayHello("Petra"));
            fail();
        } catch (Exception e) {
            // FIXME: this gives an NPE, would be better to be something like ServiceNotFoundException
            // expected
        }
View Full Code Here

        serviceNode = new DomainNode("target/test-classes/itest-nodes-helloworld-service-2.0-M5.jar");
        clientNode = new DomainNode("target/test-classes/itest-nodes-helloworld-client-2.0-M5.jar");

        Helloworld service = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldService");
        assertNotNull(service);
        assertEquals("Hello Petra", service.sayHello("Petra"));

        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
        assertEquals("Hi Hello Petra", client.sayHello("Petra"));
    }
View Full Code Here

        assertNotNull(service);
        assertEquals("Hello Petra", service.sayHello("Petra"));

        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://defaultDomain")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
        assertEquals("Hi Hello Petra", client.sayHello("Petra"));
    }

    @Test
    public void testTwoNodesDifferentDomains() throws Exception {
        serviceNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-service-2.0-M5.jar"});
View Full Code Here

    @Test
    public void testTwoNodesDifferentDomains() throws Exception {
        serviceNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-service-2.0-M5.jar"});
        Helloworld service = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldService");
        assertNotNull(service);
        assertEquals("Hello Petra", service.sayHello("Petra"));

        clientNode = new DomainNode("vm://barDomain", new String[]{"target/test-classes/itest-nodes-helloworld-client-2.0-M5.jar"});
        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://barDomain")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
View Full Code Here

        clientNode = new DomainNode("vm://barDomain", new String[]{"target/test-classes/itest-nodes-helloworld-client-2.0-M5.jar"});
        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://barDomain")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);

        try {
            assertEquals("Hi Hello Petra", client.sayHello("Petra"));
            fail();
        } catch (ServiceRuntimeException e) {
            // FIXME: this gives an SCARuntimeException, would be better to be something like ServiceNotFoundException?
            // expected
        }
View Full Code Here

        serviceNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-service-2.0-M5.jar"});
        clientNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-client-2.0-M5.jar"});

        Helloworld service = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldService");
        assertNotNull(service);
        assertEquals("Hello Petra", service.sayHello("Petra"));

        Helloworld client = SCAClientFactory.newInstance(URI.create("vm://fooDomain")).getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
        assertEquals("Hi Hello Petra", client.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.