I'm having difficulty writing DoInstead() on a protected method found in a base class. The design is much like the following:
public class A
{
protected Method(obj o)
{
}
}
public class B : A
{
}
I'd like to write a new implementation of non-public B.Method(), so I tried this:
var fakeB = Isolate.Fake.Instance<B>(Members.CallOriginal);
Isolate.NonPublic.WhenCalled(fakeB, "Method").WithGenericArguments(typeof(object)).DoInstead((o) =>
{
});
I got an error about B.Method() not being found. Is this scneario supported?