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
1.4m articles
1.4m replys
5 comments
57.0k users