use of org.opentripplanner.routing.graph.SimpleConcreteVertex in project OpenTripPlanner by opentripplanner.
the class TripTimesTest method testBikesAllowed.
@Test
public void testBikesAllowed() {
Graph graph = new Graph();
Trip trip = new Trip();
Route route = new Route();
trip.setRoute(route);
List<StopTime> stopTimes = Arrays.asList(new StopTime(), new StopTime());
TripTimes s = new TripTimes(trip, stopTimes, new Deduplicator());
RoutingRequest request = new RoutingRequest(TraverseMode.BICYCLE);
Vertex v = new SimpleConcreteVertex(graph, "", 0.0, 0.0);
request.setRoutingContext(graph, v, v);
State s0 = new State(request);
assertFalse(s.tripAcceptable(s0, 0));
BikeAccess.setForTrip(trip, BikeAccess.ALLOWED);
assertTrue(s.tripAcceptable(s0, 0));
BikeAccess.setForTrip(trip, BikeAccess.NOT_ALLOWED);
assertFalse(s.tripAcceptable(s0, 0));
}
Aggregations