public void VerifyAllTabsContainAtLeastOneElement() { int count; foreach (var category in new[] { "Domestic", "Monkeys", "Elephants", "Bears" }) { homePage.switchToCategory(category); count = homePage.countVisibleAnimals(); Assert.That(count, Is.GreaterThanOrEqualTo(1), String.Format("No elements are displayed in the tab {0}.", category)); } }
public void ThenAtLeastOneAnimalShouldBeDisplayedPerCategory() { CategoryPage categoryPage = new CategoryPage(); int count; foreach (var category in new[] { "Domestic", "Monkeys", "Elephants", "Bears" }) { categoryPage.switchToCategory(category); count = categoryPage.countVisibleAnimals(); Assert.That(count, Is.GreaterThanOrEqualTo(1), String.Format("No elements are displayed in the tab {0}.", category)); } }