use of org.apache.sling.testing.mock.osgi.OsgiServiceUtilTest.ServiceInterface3 in project sling by apache.
the class MockBundleContextDynamicReferencesTest method testAddRemoveOptionalMultipleService.
@Test
public void testAddRemoveOptionalMultipleService() {
ServiceRegistration reg3a = bundleContext.registerService(ServiceInterface3.class.getName(), dependency3a, null);
assertDependencies3(dependency3a);
ServiceRegistration reg3b = bundleContext.registerService(ServiceInterface3.class.getName(), dependency3b, null);
assertDependencies3(dependency3a, dependency3b);
reg3a.unregister();
assertDependencies3(dependency3b);
reg3b.unregister();
assertDependencies3();
}
use of org.apache.sling.testing.mock.osgi.OsgiServiceUtilTest.ServiceInterface3 in project sling by apache.
the class MockBundleContextStaticGreedyReferencesTest method testAddRemoveOptionalMultipleService.
@Test
public void testAddRemoveOptionalMultipleService() {
ServiceRegistration reg3a = bundleContext.registerService(ServiceInterface3.class.getName(), dependency3a, null);
assertDependencies3(dependency3a);
ServiceRegistration reg3b = bundleContext.registerService(ServiceInterface3.class.getName(), dependency3b, null);
assertDependencies3(dependency3a, dependency3b);
reg3a.unregister();
assertDependencies3(dependency3b);
reg3b.unregister();
assertDependencies3();
}
use of org.apache.sling.testing.mock.osgi.OsgiServiceUtilTest.ServiceInterface3 in project sling by apache.
the class MockBundleContextDynamicReferencesOsgiR6Test method testAddRemoveOptionalMultipleService.
@Test
public void testAddRemoveOptionalMultipleService() {
ServiceRegistration reg3a = bundleContext.registerService(ServiceInterface3.class.getName(), dependency3a, null);
assertDependencies3(dependency3a);
ServiceRegistration reg3b = bundleContext.registerService(ServiceInterface3.class.getName(), dependency3b, null);
assertDependencies3(dependency3a, dependency3b);
reg3a.unregister();
assertDependencies3(dependency3b);
reg3b.unregister();
assertDependencies3();
}
Aggregations