title: Moq: How to clear expectations on a mock object?
body: <p>An example - I want to test that the sniper notifies the view only for added items.</p>
  
  <pre><code>[Test]
      public void NotifiesViewOfLoss_IfCloseEventReceivedForSnipedItems()
      {
          _sniper.AddItem(TestConstants.ItemNo54321);
          _sniper.AddItem(TestConstants.ItemNo65432);
  
          _sniper.AuctionClosedFor(TestConstants.ItemNo65432);
          _mockView.Verify(view =&gt; view.UpdateStatus(TestConstants.ItemNo65432, AuctionSniperStatus.Lost));
  
          _sniper.AuctionClosedFor(TestConstants.ItemNo54321);
          _mockView.Verify(view =&gt; view.UpdateStatus(TestConstants.ItemNo54321, AuctionSniperStatus.Lost));
  
          _sniper.AuctionClosedFor(7);
  
          // doesn't work
          //_mockView.Verify(view =&gt; view.UpdateStatus(It.IsAny&lt;int&gt;(), It.IsAny&lt;AuctionSniperStatus&gt;()),
          //                Times.Never() );
      }
  </code></pre>
  
  <p>The Times.Never line doesn't work - because it matches one of the earlier calls. 
  I know that there are other alternatives:</p>
  
  <ul>
  <li>set up a new expectation to throw if called (as shown above)</li>
  <li>like specifying 7 instead of IsAny() </li>
  <li>splitting the test into 2 tests</li>
  </ul>