title: Using NUnit to test that an IEnumerable was sorted correctly (uses nested sort)
body: <p>I'm using MVP with ASP.NET Web Forms. Being a good TDDer, I want to test all the important behaviors in my Presenter, including the default sort it applies to the result set retrieved from the service layer.  The Presenter will be applying a nested sort via LINQ to Objects of the style:</p>
  
  <pre><code>public IEnumerable&lt;ViewModel&gt; MyModel{
     get
        {
            return _myService.GetResults().OrderBy(r=&gt;r.PropertyA).ThenBy(r1=&gt;r1.PropertyB);
        }
  }
  </code></pre>
  
  <p>I've looked at the IsOrderedBy extension method described <a href="https://stackoverflow.com/questions/1082624/isorderedby-extension-method">in this SO question</a>, but I'm not sure how to extend it to work with the nested sort I describe above.
  Ditto for the code posted by Jon Skeet in <a href="https://stackoverflow.com/questions/1301822/how-to-sort-an-array-of-object-by-a-specific-field-in-c/1302185#1302185">this SO question</a>.  </p>