title: Unit testing set innerexception
body: <p>I'm trying to test a method that in a particular scenario should throw an exception which has an inner exception:</p>
  
  <pre><code>mockInvoiceRepository.Setup(x =&gt; x.PersistInvoice(invoice, false)).Throws(new Exception());
  </code></pre>
  
  <p>That line of code is fine except I need to set the innerexception for the new exception that is thrown. I can't do this though because it is a readonly property and also can't mock it because it's not virtual.</p>
  
  <p>Any ideas on how to achieve this?</p>