public void ShouldFormatWhenNullObjectIsPassed() { string expected = "<html><body>data missing...</body></html>"; CatNamesByOwnerGender viewModel = new CatNamesByOwnerGender(); viewModel = null; string actual = HTMLProcessor.FormatHTML(viewModel); Assert.AreEqual(expected, actual); }
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 ShouldFormatWhenNonNullObjectIsPassed() { string expected = "<html><body><h5>a</h5><ul><li>apple</li><li>apricots</li></ul></body></html>"; CatNamesByOwnerGender viewModel = new CatNamesByOwnerGender(); viewModel.Add("a", new List <string> { "apple", "apricots" }); string actual = HTMLProcessor.FormatHTML(viewModel); Assert.AreEqual(expected, actual); }