use of org.apache.felix.scr.impl.manager.SingleComponentManager in project felix by apache.
the class ActivateMethodTest method ensureMethodNotFoundMethod.
/**
* Ensures no method with the given name accepting any of the
* activate/deactive method parameters can be found.
*
* @param obj
* @param methodName
* @param version DS version tested
* @throws InvocationTargetException
* @throws IllegalAccessException
*/
private void ensureMethodNotFoundMethod(BaseObject obj, String methodName, DSVersion version) {
ComponentContainer container = newContainer();
SingleComponentManager icm = new SingleComponentManager(container, new ComponentMethodsImpl());
ActivateMethod am = new ActivateMethod(methodName, methodName != null, obj.getClass(), version, false, false);
am.invoke(obj, new ActivatorParameter(m_ctx, -1), null, icm);
Method m = am.getMethod();
assertNull(m);
assertNull(obj.getCalledMethod());
}
use of org.apache.felix.scr.impl.manager.SingleComponentManager in project felix by apache.
the class ActivateMethodTest method newContainer.
private ComponentContainer newContainer() {
final ComponentMetadata metadata = newMetadata();
ComponentContainer container = new ComponentContainer() {
public BundleComponentActivator getActivator() {
return null;
}
public ComponentMetadata getComponentMetadata() {
return metadata;
}
public void disposed(SingleComponentManager component) {
}
public boolean isEnabled() {
return false;
}
};
return container;
}
use of org.apache.felix.scr.impl.manager.SingleComponentManager in project felix by apache.
the class BindMethodTest method newContainer.
private ComponentContainer newContainer() {
final ComponentMetadata metadata = newMetadata();
ComponentContainer container = new ComponentContainer() {
public BundleComponentActivator getActivator() {
return null;
}
public ComponentMetadata getComponentMetadata() {
return metadata;
}
public void disposed(SingleComponentManager component) {
}
public boolean isEnabled() {
return false;
}
};
return container;
}
Aggregations