use of org.apache.felix.ipojo.runtime.core.services.HandlerBindingTestService in project felix by apache.
the class TestHandlerBindingAndIgnoreAnnotation method testFooHandlerBinding.
@Test
public void testFooHandlerBinding() {
/*
HandlerFactory handlerFactory = ipojoHelper.getHandlerFactory("com.acme:foo");
assertNotNull(handlerFactory);
assertEquals(Factory.VALID, handlerFactory.getState());
*/
// verify component's factory is here
// verify BazService has been published
// --> verify instance has been created
Factory factory = ipojoHelper.getFactory(FACTORY_NAME);
assertNotNull(factory);
assertEquals(Factory.VALID, factory.getState());
List<HandlerBindingTestService> services = osgiHelper.getServiceObjects(HandlerBindingTestService.class);
assertEquals(1, services.size());
HandlerBindingTestService baz = services.get(0);
assertEquals("Bonjour", baz.get("greeting"));
assertEquals("Welcome", baz.get("welcome"));
assertNull(baz.get("ignored"));
ipojoHelper.dispose();
}
Aggregations