Search in sources :

Example 6 with CmdLineArgs

use of org.apache.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();
}
Also used : CmdLineArgs(org.apache.jena.cmd.CmdLineArgs) Test(org.junit.Test)

Example 7 with CmdLineArgs

use of org.apache.jena.cmd.CmdLineArgs 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));
}
Also used : ArgDecl(org.apache.jena.cmd.ArgDecl) CmdLineArgs(org.apache.jena.cmd.CmdLineArgs) Test(org.junit.Test)

Example 8 with CmdLineArgs

use of org.apache.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));
}
Also used : ArgDecl(org.apache.jena.cmd.ArgDecl) CmdLineArgs(org.apache.jena.cmd.CmdLineArgs) Test(org.junit.Test)

Aggregations

CmdLineArgs (org.apache.jena.cmd.CmdLineArgs)8 ArgDecl (org.apache.jena.cmd.ArgDecl)7 Test (org.junit.Test)7 IndentedWriter (org.apache.jena.atlas.io.IndentedWriter)1 CmdException (org.apache.jena.cmd.CmdException)1 TerminationException (org.apache.jena.cmd.TerminationException)1 Node (org.apache.jena.graph.Node)1 QueryParseException (org.apache.jena.query.QueryParseException)1 PrefixMapping (org.apache.jena.shared.PrefixMapping)1 Prologue (org.apache.jena.sparql.core.Prologue)1 ExecutionContext (org.apache.jena.sparql.engine.ExecutionContext)1 Expr (org.apache.jena.sparql.expr.Expr)1 ExprEvalException (org.apache.jena.sparql.expr.ExprEvalException)1 NodeValue (org.apache.jena.sparql.expr.NodeValue)1 FunctionEnv (org.apache.jena.sparql.function.FunctionEnv)1