public static ForecastRow BuildHeader1(string headerTitle) { ForecastRow retRow = new ForecastRow(); retRow.Header = headerTitle; retRow.RowType = Enums.TableRowType.header1; return(retRow); }
[TestMethod] //This will expect actual integration to service public void ForecastShowsNext5Days() { //Setup var now = DateTime.Now; //Assert for (int i = 0; i < 5; i++) { string expectedWeekDay = now.AddDays(i).DayOfWeek.ToString().Substring(0, 3); int expectedDate = now.AddDays(i).Day; ForecastRow forecastRow = WeatherPage.ForecastDay(i + 1); Assert.AreEqual(expectedWeekDay, forecastRow.DayOfWeek.Text, "Day of week is incorrect in row " + i); Assert.AreEqual(expectedDate, forecastRow.DayOfMonth.Text, "Day of month is incorrect in row " + i); } }