assertEquals(endTime, path.getEndTime());
}
public void testRoutingOverMidnight() throws Exception {
// this route only runs on weekdays
Vertex stop_g = graph.getVertex("agency:G_depart");
Vertex stop_h = graph.getVertex("agency:H_arrive");
ShortestPathTree spt;
GraphPath path;
RoutingRequest options = new RoutingRequest();
// Friday evening
options.dateTime = TestUtils.dateInSeconds("America/New_York", 2009, 8, 18, 23, 20, 0);
options.setRoutingContext(graph, stop_g, stop_h);
spt = aStar.getShortestPathTree(options);
path = spt.getPath(stop_h, false);
assertNotNull(path);
assertEquals(4, path.states.size());
// Saturday morning
long startTime = TestUtils.dateInSeconds("America/New_York", 2009, 8, 19, 0, 5, 0);
options.dateTime = startTime;
options.setRoutingContext(graph, stop_g.getLabel(), stop_h.getLabel());
spt = aStar.getShortestPathTree(options);
path = spt.getPath(stop_h, false);
assertNotNull(path);
assertEquals(4, path.states.size());