use of org.apache.aries.blueprint.testbundles.BeanCItf in project aries by apache.
the class SpringTest method testSpringBundle.
@Test
public void testSpringBundle() throws Exception {
Bundle bundles = context().getBundleByName("org.apache.aries.blueprint.testbundles");
assertNotNull(bundles);
bundles.start();
BlueprintContainer container = startBundleBlueprint("org.apache.aries.blueprint.testbundles");
List list = (List) container.getComponentInstance("springList");
System.out.println(list);
BeanCItf beanC = (BeanCItf) list.get(4);
assertEquals(1, beanC.getInitialized());
try {
beanC.doSomething();
fail("Should have thrown an exception because the transaction manager is not defined");
} catch (NoSuchBeanDefinitionException e) {
// expected
}
}
Aggregations