use of org.apache.jena.sparql.expr.nodevalue.NodeValueString in project jena by apache.
the class NodeValueRewriterTest method visitNodeValueStringNodeTest.
@Test
public void visitNodeValueStringNodeTest() {
Node n = NodeFactory.createLiteral("Hello");
NodeValue nv = new NodeValueString("Hello", n);
nv.visit(rewriter);
NodeValue result = rewriter.getResult();
assertEquals(nv, result);
assertEquals(nv.getClass(), result.getClass());
}
use of org.apache.jena.sparql.expr.nodevalue.NodeValueString in project jena by apache.
the class NodeValueRewriterTest method visitNodeValueStringTest.
@Test
public void visitNodeValueStringTest() {
NodeValue nv = new NodeValueString("Hello");
nv.visit(rewriter);
NodeValue result = rewriter.getResult();
assertEquals(nv, result);
assertEquals(nv.getClass(), result.getClass());
}
use of org.apache.jena.sparql.expr.nodevalue.NodeValueString in project jena by apache.
the class ExprFactoryTest method asExprTest_string.
@Test
public void asExprTest_string() {
Expr e = factory.asExpr("foo");
assertTrue(e instanceof NodeValueString);
NodeValueString n = (NodeValueString) e;
assertEquals("foo", n.asString());
}
use of org.apache.jena.sparql.expr.nodevalue.NodeValueString in project jena by apache.
the class ExprFactoryTest method asExprTest_asterisk.
@Test
public void asExprTest_asterisk() {
Expr e = factory.asExpr("*");
assertTrue(e instanceof NodeValueString);
NodeValueString n = (NodeValueString) e;
assertEquals("*", n.asString());
}
use of org.apache.jena.sparql.expr.nodevalue.NodeValueString in project jena by apache.
the class ExprFactoryTest method asExprTest_URIstring.
@Test
public void asExprTest_URIstring() {
Expr e = factory.asExpr("http://example.com/foo");
assertTrue(e instanceof NodeValueString);
NodeValueString n = (NodeValueString) e;
assertEquals("\"http://example.com/foo\"", n.asNode().toString());
}
Aggregations