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

basic, broken tests.

parent 5e5c6a52
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());
}
}
Markdown is supported
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