0

We use Moq for our unit tests, I dont understand why we are doing the following with the VerifyAll call. Would there be a reason why this is done or can I just use the verify method?

createbleUtility.Verify(x => x.AuditCreatedItem(It.IsAny<TaskFinished>()), Times.Exactly(2));
createbleUtility.VerifyAll();
Andrew
  • 2,571
  • 2
  • 31
  • 56
  • Ok so it makes sure you setup methods are called as well as as the verify that a method was called? – Andrew Sep 27 '18 at 12:55

1 Answers1

1

VerifyAll() is for verifying that all the expectations have been met. It is not required if you only have one expectation and you use the verify as specified in your example