This morning we were looking for the usage of mocking
"out" parameters and we found a solution, but we had to
look into the source code of NMock2 and do some
research and tests until we found the solution.
The Method to mock:
int GetRevocation(string plate, out bool found);
Mockery mockery = new Mockery();
IServiceAgent mock = mockery.NewMock<IServiceAgent>();
new NMock2.Actions.SetNamedParameterAction("found", true));
Greetings from Switzerland
Log in to post a comment.