title: How do I use Assert.Throws to assert the type of the exception?
body: <p>How do I use <code>Assert.Throws</code> to assert the type of the exception and the actual message wording?</p>
  <p>Something like this:</p>
  <pre><code>Assert.Throws&lt;Exception&gt;(
      ()=&gt;user.MakeUserActive()).WithMessage(&quot;Actual exception message&quot;)
  </code></pre>
  <p>The method I am testing throws multiple messages of the same type, with different messages, and I need a way to test that the correct message is thrown depending on the context.</p>