Commit 8efa30ba authored by Riegel's avatar Riegel
Browse files

Test: Simplify zip-validation test

2 merge requests!28Version 3.17.0 Release,!26Add ZIP-archive support
Showing with 3 additions and 9 deletions
+3 -9
......@@ -76,15 +76,9 @@ public class ZipTest {
public void testValidation(){
ParserConfiguration valConfig = new ParserConfiguration(8,true);
CityGmlZipArchive cgmlArch = CityGmlZipArchive.fromZipFile("src/test/resources/zip/validate.zip", valConfig);
int faultyFiles = 0;
for (CityGmlZipEntry entry : cgmlArch.getEntries()) {
if (entry instanceof ErroneousEntry errEntry) {
assertTrue(entry.getFileName().matches("validate/valFaulty.gml$"));
assertEquals(ZipEntryErrorType.INVALID_CITY_GML_FILE, errEntry.getErrorType());
faultyFiles++;
}
}
assertEquals(1, faultyFiles);
assertNotNull(cgmlArch);
assertNull(cgmlArch.getEntry("valCorrect.gml").getErrorType());
assertEquals(ZipEntryErrorType.INVALID_CITY_GML_FILE, cgmlArch.getEntry("valFaulty.gml").getErrorType());
}
}
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