Package org.apache.felix.ipojo.runtime.core.test.services

Examples of org.apache.felix.ipojo.runtime.core.test.services.Listener


    HelloService service;

    private Listener listener;

    public DefaultLeakingService() {
        listener = new Listener() {
            // When the Hello Service will become unavailable, calling doSomething should use a nullable object.
            // Therefore, it should return 'null'.
            @Override
            public String doSomething() {
                return service.hello("iPOJO");
View Full Code Here


        LeakingService service = osgiHelper.waitForService(LeakingService.class,
                "(instance.name=" + leaking.getInstanceName() + ")", 1000);
        osgiHelper.waitForService(HelloService.class, "(instance.name=" + hello.getInstanceName() + ")", 1000);

        Listener listener = service.getListener();
        String result = listener.doSomething();
        assertThat(result).isEqualToIgnoringCase("hello iPOJO");

        hello.stop();

        result = listener.doSomething();
        assertThat(result).isNull();
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.runtime.core.test.services.Listener

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.