use of org.apache.aries.proxy.impl.AbstractProxyManager in project aries by apache.
the class ReferencesTest method testWiring.
public void testWiring() throws Exception {
ComponentDefinitionRegistryImpl registry = parse("/test-references.xml");
ProxyManager proxyManager = new AbstractProxyManager() {
@Override
protected Object createNewProxy(Bundle bundle, Collection<Class<?>> classes, Callable<Object> objectCallable, InvocationListener invocationListener) throws UnableToProxyException {
return new Object();
}
@Override
protected InvocationHandler getInvocationHandler(Object o) {
return null;
}
@Override
protected boolean isProxyClass(Class<?> aClass) {
return false;
}
};
Repository repository = new TestBlueprintContainer(registry, proxyManager).getRepository();
repository.create("refItf");
try {
repository.create("refClsErr");
fail("Should have failed");
} catch (ComponentDefinitionException e) {
}
repository.create("refClsOk");
}
Aggregations