public void TestOneDaysInMonth() { var testWeatherInfo = new WeatherInfo(DateTime.Parse("1/2/2007"), 10, 0); var collection = new WeatherInfoCollection("Test1", new List <WeatherInfo> { testWeatherInfo }); var result = collection.FindHighestLowTemps(); var expected = new WeatherInfoCollection("Test1", new List <WeatherInfo> { testWeatherInfo }); Assert.IsTrue(expected.SequenceEqual(result)); }
public void TestTwoDaysInMonthLowBoundry() { var testinfo1S = new WeatherInfo(DateTime.Parse("1/2/2007"), 10, 1); var testinfo2 = new WeatherInfo(DateTime.Parse("1/2/2007"), 10, 0); var collection = new WeatherInfoCollection("Test1", new List <WeatherInfo> { testinfo1S, testinfo2 }); var expected = new WeatherInfoCollection("Test1", new List <WeatherInfo> { testinfo1S }); var result = collection.FindHighestLowTemps(); Assert.IsTrue(expected.SequenceEqual(result)); }
public void TestManyDaysInMonthTempertureSequenceFirstIsHighest() { var testinfo1S = new WeatherInfo(DateTime.Parse("1/2/2007"), 10, 1); var testinfo2 = new WeatherInfo(DateTime.Parse("1/2/2007"), 10, 0); var testinfo3 = new WeatherInfo(DateTime.Parse("1/2/2007"), 10, -1); var collection = new WeatherInfoCollection("Test1", new List <WeatherInfo> { testinfo1S, testinfo2, testinfo3 }); var expected = new WeatherInfoCollection("Test1", new List <WeatherInfo> { testinfo1S }); var result = collection.FindHighestLowTemps(); Assert.IsTrue(expected.SequenceEqual(result)); }