use of org.apache.jena.query.ResultSetRewindable in project jena by apache.
the class TestResultSetThrift method resultSet_02.
@Test
public void resultSet_02() {
ResultSetRewindable r1 = test(rs1);
// not reordered
r1.reset();
rs2.reset();
assertFalse(ResultSetCompare.equalsByTermAndOrder(r1, rs2));
rs2.reset();
}
use of org.apache.jena.query.ResultSetRewindable in project jena by apache.
the class TestResultSetThrift method resultSet_03.
@Test
public void resultSet_03() {
ResultSetRewindable r2 = test(rs2);
// not reordered
r2.reset();
rs1.reset();
assertFalse(ResultSetCompare.equalsByTermAndOrder(r2, rs1));
rs1.reset();
}
use of org.apache.jena.query.ResultSetRewindable in project jena by apache.
the class TestResultSetThrift method make.
private static ResultSetRewindable make(String... strings) {
String s = StrUtils.strjoinNL(strings);
Item item = SSE.parse(s);
ResultSetRewindable rs = ResultSetFactory.makeRewindable(BuilderResultSet.build(item));
return rs;
}
use of org.apache.jena.query.ResultSetRewindable in project jena by apache.
the class TestResultSet method test_RS_2_str.
@Test
public void test_RS_2_str() {
ResultSetRewindable rs1 = makeRewindable("x", org.apache.jena.graph.NodeFactory.createURI("tag:local"));
String x = ResultSetFormatter.asXMLString(rs1);
rs1.reset();
ResultSet rs2 = ResultSetFactory.fromXML(x);
assertTrue(ResultSetCompare.equalsByTerm(rs1, rs2));
}
use of org.apache.jena.query.ResultSetRewindable in project jena by apache.
the class TestResultSet method test_RS_cmp_5.
@Test
public void test_RS_cmp_5() {
// Same variable, different values
ResultSetRewindable rs1 = makeRewindable("x", org.apache.jena.graph.NodeFactory.createURI("tag:local:1"));
ResultSetRewindable rs2 = makeRewindable("x", org.apache.jena.graph.NodeFactory.createURI("tag:local:2"));
assertFalse(ResultSetCompare.equalsByTerm(rs1, rs2));
rs1.reset();
rs2.reset();
assertFalse(ResultSetCompare.equalsByTerm(rs1, rs2));
}
Aggregations