private string ProcessResults(List <PetOwner> owners) { owners = PetProcessor.RemoveOwnersWithoutPets(owners); owners = PetProcessor.GetOwnersByPetType(owners, Pets.cat); CatNamesByOwnerGender catNamesViewModel = CatProcessor.LoadCatNamesByOwnerGender(owners); catNamesViewModel = CatProcessor.SortCatNames(catNamesViewModel); return(HTMLProcessor.FormatHTML(catNamesViewModel)); }
public void ShouldSortCatNamesInTheObject() { CatNamesByOwnerGender expected = new CatNamesByOwnerGender(); expected.Add("fruits", new List <string> { "apple", "banana", "kiwi" }); CatNamesByOwnerGender viewModel = new CatNamesByOwnerGender(); viewModel.Add("fruits", new List <string> { "banana", "kiwi", "apple" }); CatNamesByOwnerGender actual = CatProcessor.SortCatNames(viewModel); CollectionAssert.AreEqual(expected["fruits"], actual["fruits"]); }