Exemple #1
0
        public void IsStopAtWorksForSetdownOnly(Time stopArrival, Time findTime, TimesToUse arrivalOrDeparture, bool expected)
        {
            var stop = TestScheduleLocations.CreateSetdownOnlyStop(Surbiton, stopArrival);

            stop.WorkingDeparture = stopArrival.AddMinutes(1);
            var spec = CreateFindSpec(findTime, arrivalOrDeparture);

            Assert.Equal(expected, stop.IsStopAt(spec));
        }
        public void LocationHasArrivalOnlyForSetdownOnlyStop()
        {
            var locations = new[]
            {
                (ScheduleLocation)TestScheduleLocations.CreateOrigin(TestStations.Surbiton, TestSchedules.Ten),
                TestScheduleLocations.CreateSetdownOnlyStop(TestStations.ClaphamJunction, TenFifteen),
                TestScheduleLocations.CreateDestination(TestStations.Waterloo, TestSchedules.TenThirty)
            };

            var testSchedule = TestSchedules.CreateScheduleWithService(stops: locations);

            var stop = locations[1].Station.Timetable;

            var arrivals = stop.GetArrivalTimes();
            var service  = arrivals.GetService(TenFifteen);

            Assert.Equal(testSchedule.Service, service);

            AssertNoDepartureTime(stop, TenFifteen);
        }
        public void SetdownStopHasIsNotPublicDeparture()
        {
            IDeparture departure = TestScheduleLocations.CreateSetdownOnlyStop(TestStations.Surbiton, TestSchedules.Ten);

            Assert.False(departure.IsPublic);
        }
        public void SetdownStopHasPublicArrival()
        {
            IArrival arrival = TestScheduleLocations.CreateSetdownOnlyStop(TestStations.Surbiton, TestSchedules.Ten);

            Assert.True(arrival.IsPublic);
        }