Hi Soon
Currently there's no way to that through the Isolator but you can easily do that by using some reflection magic :)
Here's an example that will work on instance methods:
private object InvokeBase<T>(T instance, string methodName, params object[] methodParams)
{
Type baseType = instance.GetType().BaseType;
Type [] types = GetTypesArray(methodParams);
MethodInfo method = baseType.GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic, null, types, null);
return method.Invoke(instance, methodParams);
}
private Type[] GetTypesArray(object[] objects)
{
List<Type> types = new List<Type>();
foreach (var o in objects)
{
types.Add(o.GetType());
}
return types.ToArray();
}
//usage in test
[Test]
public void RunMe()
{
var dbnew = new DB();
// call to overload without parameters
InvokeBase(dbnew, "CallMe", new object[0]);
// call to overload with int and string parameter
InvokeBase(dbnew, "CallMe", 1, "a");
}
Hope it helps.