public void ErrorIsShownWhenCityIsNotInUK() { //Setup //Execute WeatherPage.UpdateCity("Madrid"); //Assert Assert.IsTrue(WeatherPage.ErrorMessage.Displayed, "Error message is not visible"); Assert.AreEqual("Error retrieving the forecast", WeatherPage.ErrorMessage.Text, "Error message is incorrect"); }
// [DeploymentItem("Resources\\Edinburgh.csv")] // [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "Resources\\Edinburgh.csv", "Edinburgh#csv", DataAccessMethod.Sequential)] public void ForecastIsUpdatedWhenCityIsChanged() { //Setup //Execute WeatherPage.UpdateCity("Edinburgh"); //Assert for (int i = 1; i <= 5; i++) { VerifyForecastRow(i); } }
public void DetailedForecastIsShownWhenClickingOnToday() { //Setup int rowNum = 1; var todayRow = WeatherPage.ForecastDay(rowNum); //Execute WeatherPage.UpdateCity("Edinburgh"); todayRow.DayOfWeek.Click(); //Assert for (int i = 1; i <= 4; i++) { VerifyForecastDetail(rowNum, i); } }