I have a method with a local function that I would like to be able to fake. In the example below, I would like to be able to say something like Isolate.NonPublic.WhenCalled(someObject, "LocalHelperMethod").WillReturn("fakeData"), but the method is not found. Is there a way to do this?
public string MethodUnderTest()
{
// Do stuff.
return someValue;
string LocalHelperMethod() // Private to the containing method.
{
// Desire to fake this return.
}
}