public void SortLastThenFirst_Sorts_Person_List_by_LastName_Then_FirstName() { NameSorter namesorter = new NameSorter(); List <Person> unsorted = new List <Person>(); List <Person> sorted = new List <Person>(); List <Person> expected = new List <Person>(); unsorted.Add(new Person { FirstNames = "Berry Mint", LastName = "Kelvin" }); unsorted.Add(new Person { FirstNames = "Barry Mint", LastName = "Kelvin" }); unsorted.Add(new Person { FirstNames = "Barry Mont", LastName = "Kelvin" }); unsorted.Add(new Person { FirstNames = "Barry Mont", LastName = "Kalvin" }); expected.Add(new Person { FirstNames = "Barry Mont", LastName = "Kalvin" }); expected.Add(new Person { FirstNames = "Barry Mint", LastName = "Kelvin" }); expected.Add(new Person { FirstNames = "Barry Mont", LastName = "Kelvin" }); expected.Add(new Person { FirstNames = "Berry Mint", LastName = "Kelvin" }); sorted = namesorter.SortLastThenFirst(unsorted); CollectionAssert.AreEqual(expected, sorted, "SortLastThenFirst should return a " + "List<Person> sorted in order by LastName and then FirstName"); }