title: How to use setup of a mocked anonymous type?
body: <p>I have the following repository:</p>
  
  <pre><code>interface IReportingRepository where T: Report
  {
       IEnumerable&lt;T&gt; GetReports&lt;T&gt;(object constraints);
  }
  </code></pre>
  
  <p>and I am trying to mock out a call to this repository as:</p>
  
  <pre><code>var reportingRepostory = new Mock&lt;IReportingRepository&gt;();
                         reportingRepostory.Setup(x =&gt; 
                         x.GetReports&lt;ServiceReport (Moq.It.IsAny&lt;object&gt;())).
                         Returns(new List&lt;ServiceReport&gt;(){Report1, Report2});
  </code></pre>
  
  <p>However instead of passing in</p>
  
  <pre><code>Moq.It.IsAny&lt;object&gt;()
  </code></pre>
  
  <p>I want to pass the anonymous type</p>
  
  <pre><code>new {Activated = true, Enabled = true}
  </code></pre>
  
  <p>so that I can setup my expectation that the correct anonymous type is used.</p>