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

Examples of org.apache.felix.ipojo.runtime.core.services.FooService.foo()


    @Test
    public void testSimpleExposition() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProviderSimple.getInstanceName());
        assertNotNull("Check the availability of the FS from " + fooProviderSimple.getInstanceName(), ref);
        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
        assertTrue("Check fs invocation", fs.foo());
        fooProviderSimple.stop();
        assertFalse("Check the absence of the FS from " + fooProviderSimple.getInstanceName(),
                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooProviderSimple.getInstanceName()));
    }
View Full Code Here


    @Test
    public void testItfExposition() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), fooProviderItf.getInstanceName());
        assertNotNull("Check the availability of the FS from " + fooProviderItf.getInstanceName(), ref);
        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
        assertTrue("Check fs invocation", fs.foo());
        fooProviderItf.stop();

        assertFalse("Check the absence of the FS from " + fooProviderSimple.getInstanceName(),
                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooProviderItf.getInstanceName()));
    }
View Full Code Here

        assertNotNull("Check the availability of the BS from " + fooBarProvider.getInstanceName(), refBar);

        assertSame("Check service reference equality", refFoo, refBar);

        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
        assertTrue("Check fs invocation", fs.foo());

        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
        assertTrue("Check bs invocation", bs.bar());

        fooBarProvider.stop();
View Full Code Here

        assertNotNull("Check the availability of the BS from " + fooBarProvider2.getInstanceName(), refBar);

        assertSame("Check service reference equality", refFoo, refBar);

        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
        assertTrue("Check fs invocation", fs.foo());

        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
        assertTrue("Check bs invocation", bs.bar());

        fooBarProvider2.stop();
View Full Code Here

        assertNotNull("Check the availability of the BS from " + fooBarProvider3.getInstanceName(), refBar);

        assertNotSame("Check service reference inequality", refFoo, refBar);

        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
        assertTrue("Check fs invocation", fs.foo());

        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
        assertTrue("Check bs invocation", bs.bar());

        // Check properties
View Full Code Here

            }
        }

        // Invoke
        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
        assertTrue("invoke fs", fs.foo());

        // Re-check the property (change)
        intProp = (Integer) sr.getProperty("int");
        boolProp = (Boolean) sr.getProperty("boolean");
        strProp = (String) sr.getProperty("string");
View Full Code Here

            }
        }

        // Invoke
        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
        assertTrue("invoke fs", fs.foo());

        // Re-check the property (change)
        intProp = (Integer) sr.getProperty("int");
        boolProp = (Boolean) sr.getProperty("boolean");
        strProp = (String) sr.getProperty("string");
View Full Code Here

            }
        }

        // Invoke
        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
        assertTrue("invoke fs", fs.foo());

        // Re-check the property (change)
        intProp = (Integer) sr.getProperty("int");
        boolProp = (Boolean) sr.getProperty("boolean");
        strProp = (String) sr.getProperty("string");
View Full Code Here

            }
        }

        // Invoke
        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
        assertTrue("invoke fs", fs.foo());

        // Re-check the property (change)
        intProp = (Integer) sr.getProperty("int");
        boolProp = (Boolean) sr.getProperty("boolean");
        strProp = (String) sr.getProperty("string");
View Full Code Here

        assertEquals("updated count ", 1, updated.intValue());
        assertEquals("Last updated", 5, dict.size());

        // change the field value
        assertTrue("Invoke the fs service", fs.foo());
        toCheck = fs.fooProps();


        //  Re-check the property (change)
        intProp = (Integer) toCheck.get("intProp");
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.