I have the following interface:
public interface IOuputDestination { void Write(String s); }
In my unit test, I do it like this:
var outputDestination = A.Fake<IOutputDestination>();
What I want to do is intercept the Write method, so that it uses my own implementation, which I define in my test. Something like that:
String output = ""; A.CallTo(() => outputDestination.Write(A<String>.Ignored)).Action(s => output += s);
The Action method does not exist here, but I would like for any parameter passed to outputDestination.Write to be redirected to my custom action. Is this possible with FakeItEasy? If not, is there another mocking structure that allows this behavior?
source share