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
be1c1137
Commit
be1c1137
authored
Dec 17, 2024
by
Riegel
Browse files
Test: Add testcase for Zip validation via CLI
parent
86642ac8
Changes
1
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/check/CheckerTest.java
View file @
be1c1137
...
@@ -35,6 +35,7 @@ import org.junit.rules.TemporaryFolder;
...
@@ -35,6 +35,7 @@ import org.junit.rules.TemporaryFolder;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
...
@@ -117,6 +118,26 @@ public class CheckerTest {
...
@@ -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
@Test
public
void
testZipEntryChecking
()
throws
CityGmlParseException
,
IOException
{
public
void
testZipEntryChecking
()
throws
CityGmlParseException
,
IOException
{
CityGmlZipArchive
cgmlArch
=
CityGmlZipArchive
.
register
(
"src/test/resources/zipArchive.zip"
);
CityGmlZipArchive
cgmlArch
=
CityGmlZipArchive
.
register
(
"src/test/resources/zipArchive.zip"
);
...
...
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