Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
e43835c8
Commit
e43835c8
authored
Oct 10, 2022
by
Eric Duminil
Browse files
basic, broken tests.
parent
5e5c6a52
Changes
1
Show whitespace changes
Inline
Side-by-side
src/test/java/eu/simstadt/regionchooser/RegionChooserCommandLineInterfaceTest.java
0 → 100644
View file @
e43835c8
package
eu.simstadt.regionchooser
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
import
org.junit.jupiter.api.Test
;
import
picocli.CommandLine
;
class
RegionChooserCommandLineInterfaceTest
{
@Test
void
testCLIWithoutArgument
()
{
RegionChooserCommandLineInterface
app
=
new
RegionChooserCommandLineInterface
();
CommandLine
cmd
=
new
CommandLine
(
app
);
StringWriter
sw
=
new
StringWriter
();
cmd
.
setOut
(
new
PrintWriter
(
sw
));
// black box testing
int
exitCode
=
cmd
.
execute
(
"--input=input.gml"
,
"--output=output.gml"
,
"--wkt=input.wkt"
);
assertEquals
(
0
,
exitCode
);
assertEquals
(
"Your output is abc..."
,
sw
.
toString
());
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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