title: My Rhino mocks Strict Mock expectation exceptions are being caught in the executing method. How to solve?
body: <p>I'm using Rhino Mocks to set up strict mocks. Under certain conditions, no method calls may be performed on any of these mocks.</p>
  
  <pre><code>// Arrange
  var myMock = MockRepository.GenerateStrictMock&lt;IMyClass&gt;();
  var sut = new SUT(myMock);
  
  // Act
  sut.DoSomething();
  </code></pre>
  
  <p>Now, DoSomething wraps everything in a try-catch:</p>
  
  <pre><code>public void DoSomething()
  {
      try {
          m_Class.Something();
      }
      catch {
      }
  }
  </code></pre>
  
  <p>This causes the expectationexception of the strict mock to be caught. My test passes while it shouldn't.</p>
  
  <p>I would have hoped that calling <code>myMock.VerifyAllExpectations();</code> would result in a failing test, but is not the case either.</p>
  
  <p>How can I achieve this result?</p>