public static ScheduleLocation[] CreateThreeStopSchedule(Time start) => new[] { (ScheduleLocation)TestScheduleLocations.CreateOrigin(TestStations.Surbiton, start), TestScheduleLocations.CreateStop(TestStations.ClaphamJunction, start.AddMinutes(15)), TestScheduleLocations.CreatePass(TestStations.Vauxhall, start.AddMinutes(20)), TestScheduleLocations.CreateDestination(TestStations.Waterloo, start.AddMinutes(30)) };
public static ILocationData CreateTimetabledLocations(int duration = 1440, bool cancelTimetable = false) { var data = Locations; var surbiton = data.LocationsByTiploc["SURBITN"]; var waterloo = data.LocationsByTiploc["WATRLMN"]; var clapham = data.LocationsByTiploc["CLPHMJN"]; for (int i = 0; i < duration; i += 15) { var start = First.AddMinutes(i); var stops = new[] { (ScheduleLocation)TestScheduleLocations.CreateOrigin(surbiton, start), TestScheduleLocations.CreateStop(clapham, start.AddMinutes(5)), TestScheduleLocations.CreateDestination(waterloo, start.AddMinutes(10)) }; var uid = $"X{i:D5}"; var testSchedule = TestSchedules.CreateScheduleWithService(timetableId: uid, stops: stops); if (cancelTimetable) { var cancelledSchedule = TestSchedules.CreateScheduleWithService(uid, StpIndicator.Cancelled, service: testSchedule.Service); } } return(data); }
public static ScheduleLocation[] CreateClaphamWokingSchedule(Time start) => new[] { (ScheduleLocation)TestScheduleLocations.CreateOrigin(TestStations.ClaphamJunction, start), TestScheduleLocations.CreateStop(TestStations.Weybridge, start.AddMinutes(15)), TestScheduleLocations.CreateDestination(TestStations.Woking, start.AddMinutes(30)) };