Better assertions when verifying Moq’d methods have been called

Man wearing fake glasses and moustache

Moq, according to its GitHub page, is “The most popular and friendly mocking framework forĀ .NET”. Mocking frameworks allow you to create a ‘fake’ version of a dependency (typically an interface, or abstract class). With this fake, you can then instruct the methods return values, or invoke behaviour. Alternatively you can assert the methods were called, with a certain set...