Rhino Mocks - do not claim any interaction with the layout / stub

Is it possible to say that the layout / stub did not see the interaction in RhinoMocks at all. Sort of:

logger.AssertNoInteraction();

To claim that no method was called on the encoded log.

This would be much less tiring than invoking the following every 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()));
+3
source share
1 answer

If you use a strict layout and you do not configure the wait, you will get an exception if a layout call has been called.

+6
source

Source: https://habr.com/ru/post/1731772/


All Articles