コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }