If have following class
public abstract class MyBaseClass : BaseClass
{
public override string Test(string value)
{
return value == null ? value : base.Test(value);
}
}
Using partial mocks I can actually test the first part of the Test-code (with value = null). Is it possible to test the fact that the call to the base class is actually done when value != null?
No, you can’t do that because your Test method already overrides the base method, and no ordinary dymaic mock can intercept
MyBaseClass.Test‘s invocation ofbase.Test.Here’s a more detailed explanation, although it relates to Moq. However, the same argument applies to Rhino Mocks, and here’s why.