Package org.ops4j.pax.exam.sample9.pde

Examples of org.ops4j.pax.exam.sample9.pde.HelloService


        String language = System.getProperty("pax.exam.language");
        String expected = (language.equals("en")) ? "Hello Pax!" : "Pax Vobiscum!";
        assertThat(bundleContext, is(notNullValue()));
        Map<String, String> props = new HashMap<String, String>();
        props.put("language", language);
        HelloService service = ServiceLookup.getService(bundleContext, HelloService.class, props);
        assertThat(service, is(notNullValue()));
        assertThat(service.getMessage(), is(expected));
    }
View Full Code Here


     * Here we mock an interface from our test bundle. Set felix.bootdelegation.implicit = true to
     * fail this test.
     */
    @Test
    public void bootDelegation() {
        HelloService service = mock(HelloService.class);
        service.getMessage();
    }
View Full Code Here

    private void notifyRemoteListener(String rmiProperty) throws Exception {
        int rmiPort = Integer.parseInt(rmiProperty);
        Registry registry = LocateRegistry.getRegistry(rmiPort);
        Remote remote = registry.lookup("PaxExamNotifier");
        Notifier notifier = (Notifier) remote;
        notifier.send("bundle org.ops4j.pax.exam.sample9.pde started");
    }
View Full Code Here

TOP

Related Classes of org.ops4j.pax.exam.sample9.pde.HelloService

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.