Example #1
0
        public void IsStopAtWorksForPickupOnlyPickupOnly(Time stopDeparture, Time findTime, TimesToUse arrivalOrDeparture, bool expected)
        {
            var stop = TestScheduleLocations.CreatePickupOnlyStop(Surbiton, stopDeparture);

            stop.WorkingArrival = stopDeparture.AddMinutes(-1);

            var spec = CreateFindSpec(findTime, arrivalOrDeparture);

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

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

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

            AssertNoArrivalTime(stop, TenFifteen);

            var departures = stop.GetDepartureTimes();
            var service    = departures.GetService(TenFifteen);

            Assert.Equal(testSchedule.Service, service);
        }
        public void PickupOnlyStopIsPublicDeparture()
        {
            IDeparture departure = TestScheduleLocations.CreatePickupOnlyStop(TestStations.Surbiton, TestSchedules.Ten);

            Assert.True(departure.IsPublic);
        }
        public void PickupOnlyStopIsNotPublicArrival()
        {
            IArrival arrival = TestScheduleLocations.CreatePickupOnlyStop(TestStations.Surbiton, TestSchedules.Ten);

            Assert.False(arrival.IsPublic);
        }