Moq - How to mock a function call on a concrete object?
- by dferraro
Hello,
How can I do this in Moq?
Foo bar = new Foo();
Fake(bar.PrivateGetter).Return('whatever value')
It seems I can only find how to mock an object that was created via the framework. I want to mock just a single method/property on a concrete object I've created...
In TypeMock, I would just do Isolate.WhenCalled(bar.PrivateGetter).Returns('whatever value')..
Any ideas?