Commit e43835c8 authored by Eric Duminil's avatar Eric Duminil
Browse files

basic, broken tests.

No related merge requests found
Showing with 28 additions and 0 deletions
+28 -0
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());
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment