use of org.apache.felix.dm.impl.ConfigurationDependencyImplTest.FancyService in project felix by apache.
the class FactoryConfigurationAdapterImplTest method testInvokeFancyUpdatedMethodOk.
@Test
public void testInvokeFancyUpdatedMethodOk() throws Exception {
Ensure ensure = createEnsure();
FancyService service = new FancyService(ensure);
FactoryConfigurationAdapterImpl cdi = createConfigurationDependency(service, MyConfiguration.class);
((ManagedServiceFactory) cdi.m_component.getInstance()).updated(CONF_PID, (Dictionary<String, ?>) createDictionary());
ensure.waitForStep(1, 1000);
((ManagedServiceFactory) cdi.m_component.getInstance()).deleted(CONF_PID);
ensure.waitForStep(2, 1000);
}
use of org.apache.felix.dm.impl.ConfigurationDependencyImplTest.FancyService in project felix by apache.
the class FactoryConfigurationAdapterImplTest method testDoNotInvokeFancyUpdatedMethodWithWrongSignatureOk.
@Test
public void testDoNotInvokeFancyUpdatedMethodWithWrongSignatureOk() throws Exception {
Ensure ensure = createEnsure();
FancyService service = new FancyService(ensure);
FactoryConfigurationAdapterImpl cdi = createConfigurationDependency(service, Map.class);
ensure.step(1);
((ManagedServiceFactory) cdi.m_component.getInstance()).updated(CONF_PID, (Dictionary<String, ?>) createDictionary());
TimeUnit.SECONDS.sleep(1L);
// Our step shouldn't be changed...
ensure.waitForStep(1, 1000);
}
Aggregations