Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
be1c1137
Commit
be1c1137
authored
3 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Test: Add testcase for Zip validation via CLI
parent
86642ac8
master
dev
dev_gui_features_zip_loading
3.17.0
archive/dev_gui_features_zip_loading
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/check/CheckerTest.java
+21
-0
.../java/de/hft/stuttgart/citydoctor2/check/CheckerTest.java
with
21 additions
and
0 deletions
+21
-0
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/check/CheckerTest.java
+
21
-
0
View file @
be1c1137
...
...
@@ -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"
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets