c# - Moq - Using VerifySet to check number of times called -
I'm trying to use VerifySet with Mac, so that the number of sets on a collaborative object can be checked . But when I put in the times section of the call, I get an error that the assignment operator is not valid in the expression tree.
mockTimer.VerifySet (timer => timer.opop = value); // Works OK Mock Timer VerifySet (timer = & gt; timer.pop = value, times. Once); // compilation error
You must call the function Times.Once ()
:
mockTimer.VerifySet (timer => timer.opop = value, times. Once ());
Comments
Post a Comment