Is it possible to tell that a mock/stub has seen no interaction at all in RhinoMocks. Something along the lines of:
logger.AssertNoInteraction();
Which would assert no method has been called on the stubbed logger.
This would be a much less tedious than calling the following each time:
logger.AssertWasNotCalled(l => l.Debug(Arg<string>.Is.Anything()));
logger.AssertWasNotCalled(l => l.Info(Arg<string>.Is.Anything()));
logger.AssertWasNotCalled(l => l.Warning(Arg<string>.Is.Anything()));
logger.AssertWasNotCalled(l => l.Error(Arg<string>.Is.Anything()));
If you use a strict mock and you do not set up an expectation you will get an exception if a call was made to the mock.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With