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

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -