@Test public void testShortestPathSourceFarTarget() { int dist = a.computeShortestPath(404827, 400091, "25:55:00"); assertEquals(dist, 465); dist = a.computeShortestPath(404827, 400091, "05:55:00"); assertEquals(dist, 72465); dist = a.computeShortestPath(404827, 400091, "25:55:01"); assertEquals(dist, -1); }
@Test public void testShortestPathSourceSource() { int dist = a.computeShortestPath(404827, 404827, "25:55:00"); assertEquals(dist, 0); dist = a.computeShortestPath(404827, 404827, "25:45:00"); assertEquals(dist, 600); dist = a.computeShortestPath(404827, 404827, "25:55:01"); assertEquals(dist, -1); dist = a.computeShortestPath(404827, 404827, "28:55:01"); assertEquals(dist, -1); }
@Test public void testShortestPathSourceNeighbor() { int dist = a.computeShortestPath(404827, 400095, "25:55:00"); assertEquals(dist, 65); dist = a.computeShortestPath(404827, 400095, "25:45:00"); assertEquals(dist, 665); dist = a.computeShortestPath(404827, 400095, "25:55:01"); assertEquals(dist, -1); dist = a.computeShortestPath(404827, 400095, "28:55:01"); assertEquals(dist, -1); }