Examples of StopEntriesFactory


Examples of org.onebusaway.transit_data_federation.bundle.tasks.transit_graph.StopEntriesFactory

    stopB.setName("Stop B");

    GtfsRelationalDao dao = Mockito.mock(GtfsRelationalDao.class);
    Mockito.when(dao.getAllStops()).thenReturn(Arrays.asList(stopA, stopB));

    StopEntriesFactory factory = new StopEntriesFactory();
    factory.setGtfsDao(dao);

    TransitGraphImpl graph = new TransitGraphImpl();

    AgencyEntryImpl agency = new AgencyEntryImpl();
    agency.setId("1");
    graph.putAgencyEntry(agency);
    graph.refreshAgencyMapping();

    factory.processStops(graph);

    StopEntryImpl stopEntryA = graph.getStopEntryForId(stopA.getId());

    assertEquals(stopA.getId(), stopEntryA.getId());
    assertEquals(stopA.getLat(), stopEntryA.getStopLat(), 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.