Package itest.nodes

Examples of itest.nodes.Helloworld.sayHello()


        // Ideally this would use the SCAClient API but leaving that tillwe have the basics working

        Helloworld service = node.getService(Helloworld.class, "HelloworldService");
        assertNotNull(service);
        assertEquals("Hello Petra", service.sayHello("Petra"));

        Helloworld client = node.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 = node.getService(Helloworld.class, "HelloworldClient");
        assertNotNull(client);
        assertEquals("Hi Hello Petra", client.sayHello("Petra"));
    }

    @AfterClass
    public static void tearDownAfterClass() throws Exception {
        if (node != null) {
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.1.jar");
        clientNode = new DomainNode("target/test-classes/itest-nodes-helloworld-client-2.0-M5.1.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.1.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.1.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.1.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.1.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.1.jar"});
        clientNode = new DomainNode("vm://fooDomain", new String[]{"target/test-classes/itest-nodes-helloworld-client-2.0-M5.1.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.