public void Test_AvailableForShortTermForecast_TripNull() { //Arrange DateTime dtNow = new DateTime(2014, 12, 6, 18, 40, 0); var weatherUtils = new WeatherUtils(new MockClock(dtNow)); //Act weatherUtils.AvailableForShortTermForecast(null); }
public void Test_AvailableForShortTermForecast_UnderBy_15Minutes() { //Arrange var dtNow = new DateTime(2014, 10, 1, 15, 0, 0); var dtStart = new DateTime(2014, 10, 5, 23, 30, 0); var trip = new Trip(); trip.StartDateTime = dtStart; trip.Duration = 900; // 15 minutes IClock staticClock = new MockClock(dtNow); IWeatherUtils weatherUtils = new WeatherUtils(staticClock); //Act bool available = weatherUtils.AvailableForShortTermForecast(trip); //Assert Assert.IsTrue(available); }
public void Test_AvailableForShortTermForecast_True() { //Arrange var dtNow = new DateTime(2014, 10, 1, 15, 0, 0); var dtStart = new DateTime(2014, 10, 4, 17, 0, 0); var trip = new Trip(); trip.StartDateTime = dtStart; trip.Duration = 3600; // one hour IClock staticClock = new MockClock(dtNow); IWeatherUtils weatherUtils = new WeatherUtils(staticClock); //Act bool available = weatherUtils.AvailableForShortTermForecast(trip); //Assert Assert.IsTrue(available); }