use of org.apache.aries.blueprint.testbundlee.BeanCItf in project aries by apache.
the class SpringExtenderTest method testSpringBundle.
@Test
public void testSpringBundle() throws Exception {
try {
context().getService(BeanCItf.class, 1);
fail("The service should not be registered");
} catch (RuntimeException e) {
// Expected
}
Bundle bundles = context().getBundleByName("org.apache.aries.blueprint.testbundlee");
assertNotNull(bundles);
bundles.start();
BlueprintContainer container = startBundleBlueprint("org.apache.aries.blueprint.testbundlee");
assertNotNull(container);
BeanCItf beanC1 = context().getService(BeanCItf.class, "(name=BeanC-1)");
assertEquals(1, beanC1.getInitialized());
BeanCItf beanC2 = context().getService(BeanCItf.class, "(name=BeanC-2)");
assertEquals(1, beanC2.getInitialized());
}
Aggregations