use of org.apache.aries.blueprint.pojos.PojoRecursive in project aries by apache.
the class WiringTest method testRecursive.
public void testRecursive() throws Exception {
BlueprintRepository repository = createBlueprintContainer().getRepository();
try {
repository.create("recursiveConstructor");
fail("Did not throw exception");
} catch (ComponentDefinitionException e) {
if (e.getCause() instanceof CircularDependencyException) {
// that's what we expect
} else {
fail("Did not throw expected exception");
throw e;
}
}
PojoRecursive pojo;
pojo = (PojoRecursive) repository.create("recursiveSetter");
assertNotNull(pojo);
pojo = (PojoRecursive) repository.create("recursiveInitMethod");
assertNotNull(pojo);
}
Aggregations