Search in sources :

Example 6 with CalendarServiceImpl

use of org.onebusaway.gtfs.impl.calendar.CalendarServiceImpl in project onebusaway-application-modules by camsys.

the class ExtendedCalendarServiceImplTest method before.

@Before
public void before() {
    _calendarService = new CalendarServiceImpl();
    CalendarServiceData data = new CalendarServiceData();
    _calendarService.setData(data);
    addServiceDates(data, "sA", new ServiceDate(2010, 9, 10), new ServiceDate(2010, 9, 11));
    addServiceDates(data, "sB", new ServiceDate(2010, 9, 11), new ServiceDate(2010, 9, 12));
    addServiceDates(data, "sC", new ServiceDate(2010, 9, 12), new ServiceDate(2010, 9, 13));
    addServiceDates(data, "sD", new ServiceDate(2010, 9, 13));
    interval = new ServiceInterval(time(9, 00), time(9, 05), time(10, 00), time(10, 05));
    _transitGraphDao = Mockito.mock(TransitGraphDao.class);
    _service = new ExtendedCalendarServiceImpl();
    _service.setCalendarService(_calendarService);
    _service.setTransitGraphDao(_transitGraphDao);
}
Also used : CalendarServiceData(org.onebusaway.gtfs.model.calendar.CalendarServiceData) ServiceDate(org.onebusaway.gtfs.model.calendar.ServiceDate) TransitGraphDao(org.onebusaway.transit_data_federation.services.transit_graph.TransitGraphDao) CalendarServiceImpl(org.onebusaway.gtfs.impl.calendar.CalendarServiceImpl) ServiceInterval(org.onebusaway.gtfs.model.calendar.ServiceInterval) Before(org.junit.Before)

Example 7 with CalendarServiceImpl

use of org.onebusaway.gtfs.impl.calendar.CalendarServiceImpl in project onebusaway-application-modules by camsys.

the class BlockCalendarServiceImplTest method before.

@Before
public void before() {
    _service = new BlockCalendarServiceImpl();
    _calendarData = new CalendarServiceData();
    _calendarService = new CalendarServiceImpl();
    _calendarService.setData(_calendarData);
    _extendedCalendarService = new ExtendedCalendarServiceImpl();
    _extendedCalendarService.setCalendarService(_calendarService);
    _service.setCalendarService(_extendedCalendarService);
}
Also used : CalendarServiceData(org.onebusaway.gtfs.model.calendar.CalendarServiceData) ExtendedCalendarServiceImpl(org.onebusaway.transit_data_federation.impl.ExtendedCalendarServiceImpl) CalendarServiceImpl(org.onebusaway.gtfs.impl.calendar.CalendarServiceImpl) ExtendedCalendarServiceImpl(org.onebusaway.transit_data_federation.impl.ExtendedCalendarServiceImpl) Before(org.junit.Before)

Aggregations

CalendarServiceImpl (org.onebusaway.gtfs.impl.calendar.CalendarServiceImpl)7 CalendarServiceData (org.onebusaway.gtfs.model.calendar.CalendarServiceData)7 Before (org.junit.Before)4 ServiceDate (org.onebusaway.gtfs.model.calendar.ServiceDate)3 TransitGraphDao (org.onebusaway.transit_data_federation.services.transit_graph.TransitGraphDao)2 TripDescriptor (com.google.transit.realtime.GtfsRealtime.TripDescriptor)1 TripUpdate (com.google.transit.realtime.GtfsRealtime.TripUpdate)1 StopTimeEvent (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeEvent)1 StopTimeUpdate (com.google.transit.realtime.GtfsRealtime.TripUpdate.StopTimeUpdate)1 Coordinate (com.vividsolutions.jts.geom.Coordinate)1 GeometryFactory (com.vividsolutions.jts.geom.GeometryFactory)1 LineString (com.vividsolutions.jts.geom.LineString)1 Agency (org.onebusaway.gtfs.model.Agency)1 AgencyAndId (org.onebusaway.gtfs.model.AgencyAndId)1 Route (org.onebusaway.gtfs.model.Route)1 Stop (org.onebusaway.gtfs.model.Stop)1 StopTime (org.onebusaway.gtfs.model.StopTime)1 Trip (org.onebusaway.gtfs.model.Trip)1 ServiceInterval (org.onebusaway.gtfs.model.calendar.ServiceInterval)1 ShapePointHelper (org.onebusaway.transit_data_federation.bundle.tasks.ShapePointHelper)1