Examples of sayHello()


Examples of it0017.HelloWorldJNI.sayHello()

{
    @Test public final void testNativeHelloWorldJNI()
        throws Exception
    {
        HelloWorldJNI app = new HelloWorldJNI();
        Assert.assertEquals( "Hello NAR World!", app.sayHello() );
    }
}
View Full Code Here

Examples of itest.HelloworldService.sayHello()

    }

    public void testInvoke() throws NoSuchServiceException, NoSuchDomainException {
        HelloworldService service =
            SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent");
        String result = service.sayHello("petra");
        assertEquals("Hello petra", result);
        System.out.println("Result from SCAClient call = " + result);
    }

    @Override
View Full Code Here

Examples of itest.HelloworldService.sayHello()

        node = NodeFactory.getInstance().createNode((String)null, new String[] {"target/classes"});
        node.start();

        SCAClientFactory clientFactory = SCAClientFactory.newInstance(URI.create("default"));
        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"));

    }
View Full Code Here

Examples of itest.HelloworldService.sayHello()

        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

Examples of itest.HelloworldService.sayHello()

        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"));
    }

//    @Test
//    public void testWithoutServiceName() throws Exception {
//        node = NodeFactory.getInstance().createNode(URI.create("myFooDomain"), new String[] {"target/classes"});
View Full Code Here

Examples of itest.HelloworldService.sayHello()

    public void testInvoke() throws Exception {
        // At the moment the SCAClientFactory assumes that only one domain is active
        // in a JVM. So we pass in null for the domain name and get what we're given
        HelloworldService service =
            SCAClientFactory.newInstance(URI.create("default")).getService(HelloworldService.class, "HelloworldComponent");
        assertEquals("Hello petra", service.sayHello("petra"));
    }

    @Override
    protected void tearDown() throws Exception {
        node.stop();
View Full Code Here

Examples of itest.nodes.Helloworld.sayHello()

    @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

Examples of itest.nodes.Helloworld.sayHello()

    @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

Examples of itest.nodes.Helloworld.sayHello()

        }

        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

Examples of itest.nodes.Helloworld.sayHello()

        serviceNode = new DomainNode("target/test-classes/itest-nodes-helloworld-service-2.0-SNAPSHOT.jar");
        clientNode = new DomainNode("target/test-classes/itest-nodes-helloworld-client-2.0-SNAPSHOT.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
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.