I read the question at What is the purpose of Verifiable() in Moq? and have this question in my mind. Need your help to explain that.
VerifyAll() is for verifying that all the expectations have been met. Suppose you have:
VerifyAll()
myMock.Setup(m => m.DoSomething()).Returns(1); mySut.Do(); myMock.VerifyAll(); // Fail if DoSomething was not called
HTH
2.1m questions
2.1m answers
60 comments
57.0k users