use of jena.cmd.ArgDecl in project jena by apache.
the class TestCmdLine method test_Flag3.
@Test
public void test_Flag3() {
String[] args = new String[] { "-a", "filename" };
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.ArgDecl in project jena by apache.
the class TestCmdLine method test_Arg2.
@Test
public void test_Arg2() {
String[] args = new String[] { "-arg=ARG", "filename" };
CmdLineArgs cl = new CmdLineArgs(args);
ArgDecl argA = new ArgDecl(true, "arg");
cl.add(argA);
cl.process();
assertTrue("No -arg= argument found", cl.contains(argA));
assertEquals("", cl.getValue(argA), "ARG");
assertEquals("", cl.getArg("arg").getValue(), "ARG");
}
Aggregations