public void TestCollectionSize1() { var weatherData = new WeatherDataAnalysis.Model.WeatherDataCollection { new WeatherData(DateTime.Now, 90, 40) }; Assert.AreEqual(90, weatherData.GetDaysWithLowestHighTempByYear()[0].High); }
public void TestCollectionSize3() { var weatherData = new WeatherDataAnalysis.Model.WeatherDataCollection { new WeatherData(DateTime.Now, 90, 70), new WeatherData(DateTime.Now.AddDays(1), 100, 50), new WeatherData(DateTime.Now.AddDays(2), 70, 40) }; Assert.AreEqual(70, weatherData.GetDaysWithLowestHighTempByYear()[0].High); }
public void TestEmptyCollection() { var weatherData = new WeatherDataAnalysis.Model.WeatherDataCollection(); Assert.ThrowsException <InvalidOperationException>(() => weatherData.GetDaysWithLowestHighTempByYear()); }