I read the question at http://stackoverflow.com/questions/980554/what-is-the-purpose-of-verifiable-in-moq and have this question in my mind. Need your help to explain that.
+1
A:
VerifyAll is for verify that all the expectationa have been met. Suppose you have:
myMock.Setup(m => m.DoSomething()).Returns(1);
mySut.Do();
myMock.VerifyAll(); // Fail if DoSomething was not called
HTH
ema
2010-09-15 10:08:00
This doesnt illustrate the diff between V and VA very well though (which is what the OP asked for), does it?
Ruben Bartelink
2010-09-16 12:44:07
You use Verify when you can use the AAA syntax and when you don't need to setup expectation on the mock object.
ema
2010-09-17 11:09:29