title: Correct Way to Test for a Dynamic Property with NUnit
body: <p>Writing tests in NUnit, it seems like it would be strait forward to test for the existence of a property on a dynamic object.</p>
  
  <pre><code>Assert.That(() =&gt; { var x = aDynamic.expectedProperty; }, Throws.Nothing);
  </code></pre>
  
  <p>However testing the converse is where I hit a sang.</p>
  
  <pre><code>Assert.That(() =&gt; { var x = aDynamic.unexpectedProperty; }, Throws.TypeOf&lt;RuntimeBinderException&gt;());
  </code></pre>
  
  <p>This throws an <code>NUnit.Framework.AssertionException</code> while I am expecting a <code>RuntimeBinderException</code> and despite how I try to mitigate this it never succeeds with the specific exception. Even when specifically caught.</p>
  
  <pre><code>Assert.That(
      () =&gt;
      {
          try
          {
              var x = aDynamic.unexpectedProperty;
          }
          catch (RuntimeBinderException ex)
          {
              throw ex;
          }
          catch (Exception ex)
          {
              //do nothing
          }
      },
      Throws.TypeOf&lt;RuntimeBinderException&gt;());
  </code></pre>