Skip to content
Snippets Groups Projects
Commit 95bb492b authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Removed output and changet test to really do some assertions.

parent 559a8c1b
No related branches found
No related tags found
No related merge requests found
...@@ -67,11 +67,46 @@ public class DumpManagerTest { ...@@ -67,11 +67,46 @@ public class DumpManagerTest {
DumpManager.activate(dump); DumpManager.activate(dump);
locationsinglePoint(); locationsinglePoint();
DumpManager.deactivate(); DumpManager.deactivate();
int countAlgorithm = 0;
int countEllipsoid = 0;
int countSpan = 0;
int countTransform = 0;
int countDEMTile = 0;
int countDEMCell = 0;
int countDirectLoc = 0;
BufferedReader br = new BufferedReader(new FileReader(dump)); BufferedReader br = new BufferedReader(new FileReader(dump));
for (String line = br.readLine(); line != null; line = br.readLine()) { for (String line = br.readLine(); line != null; line = br.readLine()) {
System.out.println(line); String trimmed = line.trim();
if (trimmed.length() > 0 && !trimmed.startsWith("#")){
if (trimmed.startsWith("algorithm:")) {
++countAlgorithm;
} else if (trimmed.startsWith("ellipsoid:")) {
++countEllipsoid;
} else if (trimmed.startsWith("span:")) {
++countSpan;
} else if (trimmed.startsWith("transform:")) {
++countTransform;
} else if (trimmed.startsWith("DEM tile:")) {
++countDEMTile;
} else if (trimmed.startsWith("DEM cell:")) {
++countDEMCell;
} else if (trimmed.startsWith("direct location:")) {
++countDirectLoc;
} else {
Assert.fail(line);
}
}
} }
br.close(); br.close();
Assert.assertEquals(1, countAlgorithm);
Assert.assertEquals(1, countEllipsoid);
Assert.assertEquals(1, countSpan);
Assert.assertEquals(1, countTransform);
Assert.assertEquals(2, countDEMTile);
Assert.assertEquals(884, countDEMCell);
Assert.assertEquals(400, countDirectLoc);
} }
public void locationsinglePoint() public void locationsinglePoint()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment