Commit bfcd41a5 authored by hengwen's avatar hengwen
Browse files

Fix test

parent 89574766
...@@ -28,22 +28,22 @@ public class OverlayUtilTest { ...@@ -28,22 +28,22 @@ public class OverlayUtilTest {
public void createOverlayMap() throws Exception { public void createOverlayMap() throws Exception {
String basePath = getClass().getResource("/").getPath(); String basePath = getClass().getResource("/").getPath();
String mapPath = basePath + "/straight.osm"; String mapPath = basePath + "/straight.osm";
int numSectors = 2; int numSectors = 3;
new File(basePath + "straight.part.2").delete(); new File(basePath + "straight.part.3").delete();
new File(basePath + "straight.part.2-0.osm").delete(); new File(basePath + "straight.part.3-0.osm").delete();
new File(basePath + "straight.part.2-1.osm").delete(); new File(basePath + "straight.part.3-1.osm").delete();
new File(basePath + "straight.part.2.overlay.dot").delete(); new File(basePath + "straight.part.3.overlay.dot").delete();
MetisGraph graph = new MetisGraph(mapPath, numSectors); MetisGraph graph = new MetisGraph(mapPath, numSectors);
graph.sectorize(); graph.sectorize();
OverlayUtil.createOverlayMap(graph.getOriginalGraph(), graph.getOsmIdSectorMapping(), basePath + "/straight.part.2.overlay.dot"); OverlayUtil.createOverlayMap(graph.getOriginalGraph(), graph.getOsmIdSectorMapping(), basePath + "/straight.part.3.overlay.dot");
// check file existence // check file existence
assertTrue(new File(basePath + "straight.part.2").exists()); assertTrue(new File(basePath + "straight.part.3").exists());
assertTrue(new File(basePath + "straight.part.2-0.osm").exists()); assertTrue(new File(basePath + "straight.part.3-0.osm").exists());
assertTrue(new File(basePath + "straight.part.2-1.osm").exists()); assertTrue(new File(basePath + "straight.part.3-1.osm").exists());
assertTrue(new File(basePath + "straight.part.2.overlay.dot").exists()); assertTrue(new File(basePath + "straight.part.3.overlay.dot").exists());
} }
@Test @Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment