I recently discovered that FluentAssertions has a collection assertion named BeInAscendingOrder. Awesome!
public class MyItems
{
public int SequenceNumber { get; set; }
public int Name { get; set; }
}
IList<int> resultingList = myClassUnderTest.GetOrderedList();
resultingList.Should().BeInAscendingOrder(m => m.SequenceNumber);
But now I would like to test that a list is sorted by 2 properties. Is this possible?