Commit f65eb918 authored by Eric Duminil's avatar Eric Duminil
Browse files

All files required for tests

parent 534d15df
*_test.gml
\ No newline at end of file
This diff is collapsed.
...@@ -58,7 +58,7 @@ public class AlkisGreenEnricher ...@@ -58,7 +58,7 @@ public class AlkisGreenEnricher
CityGMLWriteException { CityGMLWriteException {
System.out.println("Reading CityGML file"); System.out.println("Reading CityGML file");
Path inFile = Paths.get(args[0]); Path inFile = Paths.get(args[0]);
Path alkisDataPath = Paths.get(args[1]); Path alkisDataPath = Paths.get(args[1]); // shp, shx and dbf should be present.
Path baumKatasterPath = Paths.get(args[2]); Path baumKatasterPath = Paths.get(args[2]);
String outputSuffix = args[3]; String outputSuffix = args[3];
CityModel cityModel = GreenEnricher.readCityGml(inFile); CityModel cityModel = GreenEnricher.readCityGml(inFile);
......
...@@ -6,21 +6,35 @@ import java.nio.file.Files; ...@@ -6,21 +6,35 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import de.hft.stuttgart.citygml.green.osm.GreenEnricher;
class AlkisGreenEnricherTest class AlkisGreenEnricherTest
{ {
@Test @Test
void testAlkisGreen() throws Exception { void testAlkisGreen() throws Exception {
Path outputGML = Paths.get("data/Grombühl_v4_case_study_with_alkis_greens_realistic.gml"); Path outputGML = Paths.get("data/Grombühl_v4_case_study_alkis_test.gml");
Files.deleteIfExists(outputGML); Files.deleteIfExists(outputGML);
assertFalse(Files.exists(outputGML)); assertFalse(Files.exists(outputGML));
String[] args = new String[] { "data/Grombühl_v4_case_study.gml", // Input GML String[] args = new String[] { "data/Grombühl_v4_case_study.gml", // Input GML
"data/tn_09663/Nutzung.shp", // ALKIS Data "data/tn_09663/Nutzung.shp", // ALKIS Data
"data/Trees/Trees_realisticScenario_20240201.shp", // Added trees, in Baumkatasterformat, "data/Trees/Trees_realisticScenario_20240201.shp", // Added trees, in Baumkatasterformat,
"with_alkis_greens_realistic" // Output GML suffix "alkis_test" // Output GML suffix
}; };
AlkisGreenEnricher.main(args); AlkisGreenEnricher.main(args);
assertTrue(Files.exists(outputGML)); assertTrue(Files.exists(outputGML));
} }
@Test
void testGreen() throws Exception {
Path outputGML = Paths.get("data/Grombühl_v4_case_study_enrich_test.gml");
Files.deleteIfExists(outputGML);
assertFalse(Files.exists(outputGML));
String[] args = new String[] { "data/Grombühl_v4_case_study.gml", // Input GML
"data/Trees/Trees_realisticScenario_20240201.shp", // Added trees, in Baumkatasterformat,
"enrich_test" // Output GML suffix
};
GreenEnricher.main(args);
assertTrue(Files.exists(outputGML));
}
} }
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