use of org.apache.felix.ipojo.runtime.externalhandlers.services.CheckServiceHandlerDescription in project felix by apache.
the class AutoHandlerTest method testInstanceCreation.
@Test
public void testInstanceCreation() throws Exception {
String v = "org.apache.felix.ipojo.test.handler.checkservice:check";
System.setProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE, v);
factory.stop();
factory.restart();
factory.start();
instance = factory.createComponentInstance(new Properties());
assertEquals(ComponentInstance.VALID, instance.getState());
HandlerDescription hd = instance.getInstanceDescription().getHandlerDescription(v);
assertNotNull(hd);
assertTrue(hd instanceof CheckServiceHandlerDescription);
System.setProperty(ORG_APACHE_FELIX_IPOJO_HANDLER_AUTO_PRIMITIVE, "");
factory.stop();
factory.restart();
factory.start();
}
Aggregations