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());
	}

}

