Commit be1c1137 authored by Riegel's avatar Riegel
Browse files

Test: Add testcase for Zip validation via CLI

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 21 additions and 0 deletions
+21 -0
......@@ -35,6 +35,7 @@ import org.junit.rules.TemporaryFolder;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
......@@ -117,6 +118,26 @@ public class CheckerTest {
}
}
@Test
public void testCliZipChecking() throws IOException, CityDoctorWriteException, CityGmlParseException, InvalidGmlFileException {
File f = folder.newFile("out.zip");
Files.probeContentType(f.toPath());
try {
String[] args = new String[6];
args[0] = "-in";
args[1] = "src/test/resources/zipArchive.zip";
args[2] = "-config";
args[3] = "src/test/resources/testConfigWithStreaming.yml";
args[4] = "-out";
args[5] = f.getAbsolutePath();
CityDoctorValidation.main(args);
assertTrue(f.exists());
} finally {
f.delete();
}
}
@Test
public void testZipEntryChecking() throws CityGmlParseException, IOException {
CityGmlZipArchive cgmlArch = CityGmlZipArchive.register("src/test/resources/zipArchive.zip");
......
Supports Markdown
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