Package org.onebusaway.transit_data_federation.services.transit_graph

Examples of org.onebusaway.transit_data_federation.services.transit_graph.TransitGraphDao


    _factory = new BlockIndexFactoryServiceImpl();

    _stop = stop("stopId", 47.0, -122.0);
    _stopId = _stop.getId();

    TransitGraphDao graph = Mockito.mock(TransitGraphDao.class);
    Mockito.when(graph.getStopEntryForId(_stop.getId(), true)).thenReturn(_stop);

    CalendarServiceData data = new CalendarServiceData();
    data.putDatesForLocalizedServiceId(lsid("sA"),
        Arrays.asList(date("2009-09-01 00:00"), date("2009-09-02 00:00")));
    data.putDatesForLocalizedServiceId(lsid("sB"),
View Full Code Here


    task.setRefreshService(refreshService);

    ShapePointHelper shapePointHelper = Mockito.mock(ShapePointHelper.class);
    task.setShapePointHelper(shapePointHelper);

    TransitGraphDao transitGraphDao = Mockito.mock(TransitGraphDao.class);
    task.setTransitGraphDao(transitGraphDao);

    StopEntry stopA = stop("stopA", 47.65, -122.32);
    StopEntry stopB = stop("stopB", 47.67, -122.30);

    Mockito.when(transitGraphDao.getAllStops()).thenReturn(
        Arrays.asList(stopA, stopB));

    TripEntryImpl tripA = trip("tripA");
    AgencyAndId shapeIdA = aid("shapeA");
    tripA.setShapeId(shapeIdA);
    TripEntryImpl tripB = trip("tripB");
    AgencyAndId shapeIdB = aid("shapeB");
    tripB.setShapeId(shapeIdB);

    Mockito.when(transitGraphDao.getAllTrips()).thenReturn(
        Arrays.asList((TripEntry) tripA, tripB));

    ShapePointsFactory factory = new ShapePointsFactory();
    factory.addPoint(47.652300128129454, -122.30622018270873);
    factory.addPoint(47.653181844549394, -122.30523312979125);
View Full Code Here

  @Test
  public void test() {
    WhereGeospatialServiceImpl service = new WhereGeospatialServiceImpl();

    TransitGraphDao dao = Mockito.mock(TransitGraphDao.class);
    service.setTransitGraphDao(dao);

    StopEntry stopA = stop("a", -0.5, -0.5);
    StopEntry stopB = stop("b", -0.5, 0.5);
    StopEntry stopC = stop("c", 0.5, -0.5);
    StopEntry stopD = stop("d", 0.5, 0.5);
    List<StopEntry> allStops = Arrays.asList(stopA, stopB, stopC, stopD);

    Mockito.when(dao.getAllStops()).thenReturn(allStops);

    service.initialize();

    List<AgencyAndId> stops = service.getStopsByBounds(new CoordinateBounds(-1,
        -1, 0, 0));
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.services.transit_graph.TransitGraphDao

Copyright © 2018 www.massapicom. 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.