NMock2 question
Date: 11/18/09
(C Sharp) Keywords: no keywords
Is it possible in NMock2 to expect one of two different methods, A() or B(), on a mock to be called?
If there was a way to check how many times a given method had already been called, I could just
Expect.Once.On.(myMock).Method("A");
Expect.Once.On.(myMock).Method("B");
test(myMock);
..and then test to see if one of them had been called and forcibly call the other so the expectations would be met. Ugly but good enough, but I don't think NMock2 mocks expose any interface that allows that the number of calls to be tested?
Source: https://csharp.livejournal.com/105589.html