public void StopIsNextDay(Time startTime, bool expected) { var stops = TestSchedules.CreateThreeStopSchedule(startTime); var service = TestSchedules.CreateService(stops: stops); var clapham = service.Details.Locations[1]; var stop = new ResolvedServiceStop(service, clapham); Assert.Equal(expected, stop.IsNextDay(true)); }
public void OnlyDepartureNextDay(bool useDeparture, bool expected) { var stops = TestSchedules.CreateThreeStopSchedule(new Time(new TimeSpan(23, 40, 0))); var service = TestSchedules.CreateService(stops: stops); var clapham = service.Details.Locations[1] as ScheduleStop; clapham.Departure = new Time(new TimeSpan(0, 5, 0)).AddDay(); var stop = new ResolvedServiceStop(service, clapham); Assert.Equal(expected, stop.IsNextDay(useDeparture)); }