title: How to set the Expect call to check that a method is not called in Rhino Mocks
body: <p>Using Rhino Mocks, how do I ensure that a method is not called while setting up the Expectations on the mock object.</p>
  
  <p>In my example, I am testing the Commit method and I need to ensure that the Rollback method is not called while doing the commit. (this is because i have logic in the commit method that will automatically rollback if commit fails)</p>
  
  <p>Here's how the code looks like..</p>
  
  <pre><code>[Test]
  public void TestCommit_DoesNotRollback() 
  {
      //Arrange
      var mockStore = MockRepository.GenerateMock&lt;IStore&gt;();
      mockStore.Expect(x =&gt; x.Commit());
      //here i want to set an expectation that x.Rollback() should not be called.
  
      //Act
      subject.Commit();
  
      //Assert
      mockStore.VerifyAllExpectation();
  }
  </code></pre>
  
  <p>Of course, I can do this at Assert phase like this:</p>
  
  <pre><code>mockStore.AssertWasNotCalled(x =&gt; x.Rollback());
  </code></pre>
  
  <p>But i would like to set this as an Expectation in the first place.</p>