Moq: Extension methods (here: LoggerExtensions.LogError) may not be used in setup / verification expressions.
Sometimes when we develop unit tests it’s convenient to check if the tested code wrote something to the log. Is it a good practice to assert that some particular message appeared in the logs? I think there are pros and cons. On the pros side, we can make general assertions like “no errors were written … Read more