Mock behaviors are specified during the setup. This is the expected behavior of an object and the collaborator. While unit testing, mocking is not complete until all the mocked dependencie's invocations have been verified. It can be helpful to be aware of the number of times methods were executed or properties accessed.
The Moq framework has useful verification methods that can be used to verify mocked methods and properties. Also, the Times structure contains useful members showing the number of calls that can be allowed on a method.
The Verify method can be used to verify that a method invocation, together with the supplied parameters performed on a mock, match what was earlier configured ...