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
491b8247
Commit
491b8247
authored
3 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Test: Move CityGml zip-file validation test
parent
d2160277
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
+0
-14
...c/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/check/CheckerTest.java
+19
-3
.../java/de/hft/stuttgart/citydoctor2/check/CheckerTest.java
with
19 additions
and
17 deletions
+19
-17
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
+
0
-
14
View file @
491b8247
...
...
@@ -89,20 +89,6 @@ public class ZipTest {
assertEquals
(
ZipEntryErrorType
.
INVALID_CITY_GML_FILE
,
cgmlArch
.
getEntry
(
"valFaulty.gml"
).
getErrorType
());
}
@Test
public
void
testCityDoctorValidation
(){
CityGmlZipArchive
cgmlArch
=
CityGmlZipArchive
.
register
(
"src/test/resources/zip/mock_archive.zip"
);
assertNotNull
(
cgmlArch
);
cgmlArch
.
mountArchive
(
config
);
cgmlArch
.
streamValidateCityGml
();
for
(
CityGmlZipEntry
entry:
cgmlArch
.
getEntries
())
{
assertNotNull
(
entry
);
assertNotNull
(
entry
.
getModel
());
assertTrue
(
entry
.
getModel
().
isValidated
());
assertFalse
(
entry
.
getModel
().
getBuildings
().
get
(
0
).
containsAnyError
());
}
}
@Test
public
void
testImplicitParsing
(){
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/test/java/de/hft/stuttgart/citydoctor2/check/CheckerTest.java
+
19
-
3
View file @
491b8247
...
...
@@ -18,12 +18,12 @@
*/
package
de.hft.stuttgart.citydoctor2.check
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.File
;
import
java.io.IOException
;
import
de.hft.stuttgart.citydoctor2.parser.ParserConfiguration
;
import
de.hft.stuttgart.citydoctor2.zip.CityGmlZipArchive
;
import
de.hft.stuttgart.citydoctor2.zip.CityGmlZipEntry
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.rules.TemporaryFolder
;
...
...
@@ -36,6 +36,10 @@ import de.hft.stuttgart.citydoctor2.parser.CityGmlParseException;
import
de.hft.stuttgart.citydoctor2.parser.CityGmlParser
;
import
de.hft.stuttgart.citydoctor2.parser.InvalidGmlFileException
;
import
static
org
.
junit
.
Assert
.
assertFalse
;
import
static
org
.
junit
.
Assert
.
assertNotNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
*
* @author Matthias Betz
...
...
@@ -114,4 +118,16 @@ public class CheckerTest {
f3
.
delete
();
}
}
@Test
public
void
testZipEntryChecking
()
throws
CityGmlParseException
,
IOException
,
InvalidGmlFileException
,
CityDoctorWriteException
{
CityGmlZipArchive
cgmlArch
=
CityGmlZipArchive
.
register
(
"src/test/resources/zipArchive.zip"
);
assertNotNull
(
cgmlArch
);
cgmlArch
.
mountArchive
(
new
ParserConfiguration
(
8
,
false
));
ValidationConfiguration
config
=
ValidationConfiguration
.
loadStandardValidationConfig
();
for
(
CityGmlZipEntry
entry
:
cgmlArch
.
getEntries
()){
Checker
.
streamCheck
(
entry
,
null
,
null
,
config
,
null
);
}
}
}
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