Search in sources :

Example 1 with ServiceIdIntervals

use of org.onebusaway.gtfs.model.calendar.ServiceIdIntervals in project onebusaway-gtfs-modules by OneBusAway.

the class CalendarServiceImplSyntheticTest method setup.

@Before
public void setup() {
    CalendarServiceData data = new CalendarServiceData();
    data.putTimeZoneForAgencyId("A", tz);
    putServiceDatesForServiceId(data, lsid1, Arrays.asList(d1, d2));
    putServiceDatesForServiceId(data, lsid2, Arrays.asList(d2, d3));
    putServiceDatesForServiceId(data, lsid3, Arrays.asList(d1, d3));
    intervals = new ServiceIdIntervals();
    intervals.addStopTime(lsid1, hourToSec(6), hourToSec(6));
    intervals.addStopTime(lsid1, hourToSec(25), hourToSec(25));
    intervals.addStopTime(lsid2, hourToSec(4), hourToSec(5));
    intervals.addStopTime(lsid2, hourToSec(30), hourToSec(30));
    intervals.addStopTime(lsid3, hourToSec(7), hourToSec(7));
    intervals.addStopTime(lsid3, hourToSec(23), hourToSec(23));
    service = new CalendarServiceImpl();
    service.setData(data);
}
Also used : CalendarServiceData(org.onebusaway.gtfs.model.calendar.CalendarServiceData) ServiceIdIntervals(org.onebusaway.gtfs.model.calendar.ServiceIdIntervals) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 CalendarServiceData (org.onebusaway.gtfs.model.calendar.CalendarServiceData)1 ServiceIdIntervals (org.onebusaway.gtfs.model.calendar.ServiceIdIntervals)1