Commit bfcd41a5 authored by hengwen's avatar hengwen

Fix test

parent 89574766
......@@ -28,22 +28,22 @@ public class OverlayUtilTest {
public void createOverlayMap() throws Exception {
String basePath = getClass().getResource("/").getPath();
String mapPath = basePath + "/straight.osm";
int numSectors = 2;
int numSectors = 3;
new File(basePath + "straight.part.2").delete();
new File(basePath + "straight.part.2-0.osm").delete();
new File(basePath + "straight.part.2-1.osm").delete();
new File(basePath + "straight.part.2.overlay.dot").delete();
new File(basePath + "straight.part.3").delete();
new File(basePath + "straight.part.3-0.osm").delete();
new File(basePath + "straight.part.3-1.osm").delete();
new File(basePath + "straight.part.3.overlay.dot").delete();
MetisGraph graph = new MetisGraph(mapPath, numSectors);
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
assertTrue(new File(basePath + "straight.part.2").exists());
assertTrue(new File(basePath + "straight.part.2-0.osm").exists());
assertTrue(new File(basePath + "straight.part.2-1.osm").exists());
assertTrue(new File(basePath + "straight.part.2.overlay.dot").exists());
assertTrue(new File(basePath + "straight.part.3").exists());
assertTrue(new File(basePath + "straight.part.3-0.osm").exists());
assertTrue(new File(basePath + "straight.part.3-1.osm").exists());
assertTrue(new File(basePath + "straight.part.3.overlay.dot").exists());
}
@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