Search in sources :

Example 1 with ToolConfig

use of org.kie.workbench.common.migration.cli.ToolConfig in project kie-wb-common by kiegroup.

the class ToolConfigTest method testGetTarget.

@Test
public void testGetTarget() throws ParseException {
    final String[] args = { "-t", "/fake/dir" };
    CommandLine cl = new CLIManager().parse(args);
    Path path = new ToolConfig(cl).getTarget();
    assertEquals(2, path.getNameCount());
    assertEquals("fake", path.getName(0).toString());
}
Also used : Path(java.nio.file.Path) CommandLine(org.apache.commons.cli.CommandLine) ToolConfig(org.kie.workbench.common.migration.cli.ToolConfig) CLIManager(org.apache.maven.cli.CLIManager) Test(org.junit.Test)

Aggregations

Path (java.nio.file.Path)1 CommandLine (org.apache.commons.cli.CommandLine)1 CLIManager (org.apache.maven.cli.CLIManager)1 Test (org.junit.Test)1 ToolConfig (org.kie.workbench.common.migration.cli.ToolConfig)1