use of org.apache.jena.sparql.sse.Item in project jena by apache.
the class TestSSE_Forms method testForm_01.
// ---- Form
@Test
public void testForm_01() {
// Special form of nothing.
Item item = SSE.parse("(prefix ((ex: <http://example/>)))");
assertNull(item);
}
use of org.apache.jena.sparql.sse.Item in project jena by apache.
the class TestSSE_Basic method testTaggedList_2.
@Test
public void testTaggedList_2() {
Item x = Item.createTagged("TAG");
Item.addPair(x.getList(), "KEY", "VALUE");
Item y = Item.find(x.getList(), "KEY");
assertNotNull(y);
Item z = Item.find(x.getList(), "KEYKEY");
assertNull(z);
}
use of org.apache.jena.sparql.sse.Item in project jena by apache.
the class TestSSE_Builder method testBuildInt_01.
@Test
public void testBuildInt_01() {
Item item = SSE.parseItem("1");
int i = BuilderNode.buildInt(item);
assertEquals(1, i);
}
use of org.apache.jena.sparql.sse.Item in project jena by apache.
the class TestSSE_Basic method testNum_02.
@Test
public void testNum_02() {
Item item = SSE.parse("3");
assertEquals(3d, item.getDouble(), 0);
}
use of org.apache.jena.sparql.sse.Item in project jena by apache.
the class TestSSE_Basic method testEquals.
// ---- Workers ----
private void testEquals(String x) {
Item item1 = parse(x);
Item item2 = parse(x);
assertTrue(item1.equals(item2));
assertTrue(item2.equals(item1));
}
Aggregations