title: How do I test if an IHttpActionResult returns OkNegotiatedContentType<anonymous>?
body: <p>Trying to find a clean way of assert this.</p>
  
  <p>Controller method returns:</p>
  
  <pre><code>        return Ok(new
          {
             Prop = "123", // many props, handle it
          });
  </code></pre>
  
  <p>Before, I was using a string, so I did:</p>
  
  <p><code>Assert.IsInstanceOfType(result, typeof(OkNegotiatedContentResult&lt;string&gt;));</code></p>
  
  <p>However now it's an anonymous object, I can't figure out how to do the same test as above.</p>
  
  <p>There are some ways to work out if a type <em>is</em> an anonymous type that I've found on here, but not to see if something is a type of anonymous.</p>
  
  <p>Any ideas?</p>