use of org.apache.jena.sparql.expr.nodevalue.NodeValueBoolean in project jena by apache.
the class TestFunctionExpansion method test_function_expansion_01.
@Test
public void test_function_expansion_01() {
Expr e = new ExprVar("x");
UserDefinedFunctionFactory.getFactory().add("http://example/simple", e, new ArrayList<>(e.getVarsMentioned()));
UserDefinedFunction f = (UserDefinedFunction) UserDefinedFunctionFactory.getFactory().create("http://example/simple");
f.build("http://example/simple", new ExprList(new NodeValueBoolean(true)));
Expr actual = f.getActualExpr();
Assert.assertFalse(e.equals(actual));
Assert.assertEquals(0, actual.getVarsMentioned().size());
Assert.assertEquals(new NodeValueBoolean(true), actual);
}
Aggregations