Hi, I'm wondering if there's any mocking framework that allows testing methods contaning method calls to dependent class instances not injected to the tested method or its class:
void MethodToTest()
{
....
DependentClass dc = new DependentClass();
dc.Foo();
....
}
In the code above I would like to mock the call to Foo(). I guess it could be accomplished by a mocking framework using code injection? Thank you in advance for tips.