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
Eric Duminil
RegionChooser
Commits
4a460949
Commit
4a460949
authored
2 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Tests for citygml stdout. Not working yet.
parent
04a18c6b
master
develop
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+1
-0
.gitignore
src/test/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterfaceTest.java
+15
-0
.../regionchooser/RegionChooserCommandLineInterfaceTest.java
with
16 additions
and
0 deletions
+16
-0
.gitignore
+
1
-
0
View file @
4a460949
...
...
@@ -272,3 +272,4 @@ $RECYCLE.BIN/
*.lnk
# End of https://www.gitignore.io/api/java,maven,macos,linux,eclipse,windows,netbeans,intellij
/-
This diff is collapsed.
Click to expand it.
src/test/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterfaceTest.java
+
15
-
0
View file @
4a460949
...
...
@@ -113,6 +113,21 @@ void testExtractRegionWithStandardInput() throws IOException {
assertEquals
(
2
,
countBuildings
(
outGML
));
}
@Test
void
testExtractRegionWithStandardInputAndStandardOutput
()
throws
IOException
{
String
wktPolygon
=
"POLYGON((-73.9959209576448 40.73286384885367, -73.996317924579 40.732359794090684, -73.9947515145143 40.7315061442504, -73.99422580154739 40.73214841515045, -73.9959209576448 40.73286384885367))"
;
Path
citygml
=
TEST_REPOSITORY
.
resolve
(
"NewYork.proj/ManhattanSmall.gml"
);
InputStream
stdin
=
new
ByteArrayInputStream
(
wktPolygon
.
getBytes
(
StandardCharsets
.
UTF_8
));
System
.
setIn
(
stdin
);
new
CommandLine
(
new
RegionChooserCommandLineInterface
()).
execute
(
"--input="
+
citygml
,
"--output=-"
,
"--wkt=-"
);
String
expectedLog
=
"EPSG:32118"
;
assertTrue
(
err
.
toString
().
contains
(
expectedLog
),
err
.
toString
()
+
" should contain "
+
expectedLog
);
originalOut
.
println
(
err
.
toString
());
originalOut
.
println
(
"--------------------"
);
originalOut
.
println
(
out
.
toString
());
assertFalse
(
Files
.
exists
(
Paths
.
get
(
"-"
)));
}
@Test
void
testExtractRegionWithMissingInput
()
throws
IOException
{
String
wktPolygon
=
"POLYGON((-73.9959209576448 40.73286384885367, -73.996317924579 40.732359794090684, -73.9947515145143 40.7315061442504, -73.99422580154739 40.73214841515045, -73.9959209576448 40.73286384885367))"
;
...
...
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