public void FromOneWeatherInfo() { var collection = new WeatherInfoCollection("Test1", new List <WeatherInfo> { new WeatherInfo(DateTime.Today.AddDays(-3), 50, 40) }); Assert.AreEqual(40, collection.FindWithLowestTemp().First().LowTemp); }
public void FromTwoWeatherInfo() { var collection = new WeatherInfoCollection("Test1", new List <WeatherInfo> { new WeatherInfo(DateTime.Today.AddDays(-3), 0, -10), new WeatherInfo(DateTime.Today, 100, -9) }); Assert.AreEqual(-10, collection.FindWithLowestTemp().First().LowTemp); }
public void FromZeroWeatherInfo() { var collection = new WeatherInfoCollection("Test1", new List <WeatherInfo>()); Assert.ThrowsException <InvalidOperationException>(() => collection.FindWithLowestTemp().First().HighTemp); }