Search in sources :

Example 1 with AManagedService

use of org.apache.felix.dm.impl.ConfigurationDependencyImplTest.AManagedService in project felix by apache.

the class FactoryConfigurationAdapterImplTest method testInvokeManagedServiceUpdatedMethodOk.

@Test
public void testInvokeManagedServiceUpdatedMethodOk() throws Exception {
    Ensure ensure = createEnsure();
    AManagedService service = new AManagedService(ensure);
    FactoryConfigurationAdapterImpl cdi = createConfigurationDependency(service);
    ((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);
}
Also used : AManagedService(org.apache.felix.dm.impl.ConfigurationDependencyImplTest.AManagedService) Ensure(test.Ensure) ManagedServiceFactory(org.osgi.service.cm.ManagedServiceFactory) Test(org.junit.Test)

Aggregations

AManagedService (org.apache.felix.dm.impl.ConfigurationDependencyImplTest.AManagedService)1 Test (org.junit.Test)1 ManagedServiceFactory (org.osgi.service.cm.ManagedServiceFactory)1 Ensure (test.Ensure)1