Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
8efa30ba
Commit
8efa30ba
authored
Dec 10, 2024
by
Riegel
Browse files
Test: Simplify zip-validation test
parent
3de39732
Changes
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
View file @
8efa30ba
...
@@ -76,15 +76,9 @@ public class ZipTest {
...
@@ -76,15 +76,9 @@ public class ZipTest {
public
void
testValidation
(){
public
void
testValidation
(){
ParserConfiguration
valConfig
=
new
ParserConfiguration
(
8
,
true
);
ParserConfiguration
valConfig
=
new
ParserConfiguration
(
8
,
true
);
CityGmlZipArchive
cgmlArch
=
CityGmlZipArchive
.
fromZipFile
(
"src/test/resources/zip/validate.zip"
,
valConfig
);
CityGmlZipArchive
cgmlArch
=
CityGmlZipArchive
.
fromZipFile
(
"src/test/resources/zip/validate.zip"
,
valConfig
);
int
faultyFiles
=
0
;
assertNotNull
(
cgmlArch
);
for
(
CityGmlZipEntry
entry
:
cgmlArch
.
getEntries
())
{
assertNull
(
cgmlArch
.
getEntry
(
"valCorrect.gml"
).
getErrorType
());
if
(
entry
instanceof
ErroneousEntry
errEntry
)
{
assertEquals
(
ZipEntryErrorType
.
INVALID_CITY_GML_FILE
,
cgmlArch
.
getEntry
(
"valFaulty.gml"
).
getErrorType
());
assertTrue
(
entry
.
getFileName
().
matches
(
"validate/valFaulty.gml$"
));
assertEquals
(
ZipEntryErrorType
.
INVALID_CITY_GML_FILE
,
errEntry
.
getErrorType
());
faultyFiles
++;
}
}
assertEquals
(
1
,
faultyFiles
);
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment