Search in sources :

Example 6 with GtfsDao

use of org.onebusaway.gtfs.services.GtfsDao in project onebusaway-gtfs-modules by OneBusAway.

the class GtfsReaderTest method testBom.

@Test
public void testBom() throws IOException, ParseException, InterruptedException {
    MockGtfs mockGtfs = MockGtfs.create();
    mockGtfs.putDefaultStopTimes();
    mockGtfs.putFile("agency.txt", new File("src/test/resources/org/onebusaway/gtfs/bom-agency.txt"));
    GtfsDao dao = processFeed(mockGtfs.getPath(), "1", false);
    Agency agency = dao.getAgencyForId("1");
    assertEquals("Keolis Rennes", agency.getName());
}
Also used : MockGtfs(org.onebusaway.gtfs.services.MockGtfs) GtfsDao(org.onebusaway.gtfs.services.GtfsDao) File(java.io.File) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 GtfsDao (org.onebusaway.gtfs.services.GtfsDao)6 File (java.io.File)5 MockGtfs (org.onebusaway.gtfs.services.MockGtfs)2 ServiceDate (org.onebusaway.gtfs.model.calendar.ServiceDate)1