use of org.apache.jena.sparql.expr.nodevalue.NodeValueNode in project jena by apache.
the class ExprFactoryTest method asExprTest_URInode.
@Test
public void asExprTest_URInode() {
Expr e = factory.asExpr(NodeFactory.createURI("http://example.com/foo"));
assertTrue(e instanceof NodeValueNode);
NodeValueNode n = (NodeValueNode) e;
assertEquals("http://example.com/foo", n.asNode().getURI());
}
use of org.apache.jena.sparql.expr.nodevalue.NodeValueNode in project jena by apache.
the class NodeValueRewriterTest method visitNodeValueNodeTest.
@Test
public void visitNodeValueNodeTest() {
NodeValue nv = new NodeValueNode(Node.ANY);
nv.visit(rewriter);
NodeValue result = rewriter.getResult();
assertEquals(nv, result);
assertEquals(nv.getClass(), result.getClass());
}
Aggregations