use of jena.cmd.CmdLineArgs in project jena by apache.
the class TestCmdLine method test_Flag1.
@Test
public void test_Flag1() {
String[] args = new String[] { "" };
CmdLineArgs cl = new CmdLineArgs(args);
ArgDecl argA = new ArgDecl(false, "-a");
cl.add(argA);
cl.process();
assertTrue("-a argument found", !cl.contains(argA));
}
use of jena.cmd.CmdLineArgs in project jena by apache.
the class TestCmdLine method test_Flag2.
@Test
public void test_Flag2() {
String[] args = new String[] { "-a" };
CmdLineArgs cl = new CmdLineArgs(args);
ArgDecl argA = new ArgDecl(false, "-a");
cl.add(argA);
cl.process();
assertTrue("No -a argument found", cl.contains(argA));
}
use of jena.cmd.CmdLineArgs in project jena by apache.
the class TestCmdLine method test_Simple1.
@Test
public void test_Simple1() {
String[] args = new String[] { "" };
CmdLineArgs cl = new CmdLineArgs(args);
cl.process();
}
use of jena.cmd.CmdLineArgs in project jena by apache.
the class TestCmdLine method test_nArg1.
@Test
public void test_nArg1() {
String[] args = new String[] { "-arg=V1", "--arg=V2", "-v" };
CmdLineArgs cl = new CmdLineArgs(args);
ArgDecl argA = new ArgDecl(true, "-arg");
cl.add(argA);
ArgDecl argV = new ArgDecl(false, "-v");
cl.add(argV);
cl.process();
assertTrue("No -arg= argument found", cl.contains(argA));
Iterator<String> iter = cl.getValues("arg").iterator();
assertEquals("Argument 1", iter.next(), "V1");
assertEquals("Argument 2", iter.next(), "V2");
}
use of jena.cmd.CmdLineArgs in project jena by apache.
the class TestCmdLine method test_Arg1.
@Test
public void test_Arg1() {
String[] args = new String[] { "" };
CmdLineArgs cl = new CmdLineArgs(args);
ArgDecl argA = new ArgDecl(true, "-arg");
cl.add(argA);
cl.process();
assertTrue("-arg argument found", !cl.contains(argA));
}
Aggregations