I'm trying to make a mock that verifies that none of the Error or ErrorFormat calls on the log4net ILog interface were called. Given the number of various signatures this seems a bit annoying. Any better ideas that literally making a match for all 7? The .IgnoreArguments() isn't that helpful given I need to match each signature first before ignoring and putting all nulls causes ambiguous call errors so I have to use Arg.IsAny<> all over.
Signatures I want matched:
void Error(object message);
void Error(object message, Exception exception);
void ErrorFormat(string format, params object[] args);
void ErrorFormat(string format, object arg0);
void ErrorFormat(string format, object arg0, object arg1);
void ErrorFormat(string format, object arg0, object arg1, object arg2);
void ErrorFormat(IFormatProvider provider, string format, params object[] args);
Example of matching:
Mock.Arrange(() => _Logger.Error(Arg.IsAny<object>())).OccursNever();
Mock.Arrange(() => _Logger.Error(Arg.IsAny<object>(), Arg.IsAny<Exception>())).OccursNever();
... do I have to do all 7 this way?