Search in sources :

Example 1 with MutableTupleQueryResult

use of org.eclipse.rdf4j.query.impl.MutableTupleQueryResult in project rdf4j by eclipse.

the class SPARQLTSVTupleTest method assertQueryResultsEqual.

protected void assertQueryResultsEqual(TupleQueryResult expected, TupleQueryResult output) throws QueryEvaluationException, TupleQueryResultHandlerException, QueryResultHandlerException, UnsupportedEncodingException {
    MutableTupleQueryResult r1 = new MutableTupleQueryResult(expected);
    MutableTupleQueryResult r2 = new MutableTupleQueryResult(output);
    if (!QueryResults.equals(r1, r2)) {
        r1.beforeFirst();
        r2.beforeFirst();
        assertEquals(toString(r1), toString(r2));
        r2.beforeFirst();
        fail(toString(r2));
    }
}
Also used : MutableTupleQueryResult(org.eclipse.rdf4j.query.impl.MutableTupleQueryResult)

Example 2 with MutableTupleQueryResult

use of org.eclipse.rdf4j.query.impl.MutableTupleQueryResult in project rdf4j by eclipse.

the class SPARQLTSVTupleBackgroundTest method assertQueryResultsEqual.

protected void assertQueryResultsEqual(TupleQueryResult expected, TupleQueryResult output) throws QueryEvaluationException, TupleQueryResultHandlerException, QueryResultHandlerException, UnsupportedEncodingException {
    MutableTupleQueryResult r1 = new MutableTupleQueryResult(expected);
    MutableTupleQueryResult r2 = new MutableTupleQueryResult(output);
    if (!QueryResults.equals(r1, r2)) {
        r1.beforeFirst();
        r2.beforeFirst();
        assertEquals(toString(r1), toString(r2));
        r2.beforeFirst();
        fail(toString(r2));
    }
}
Also used : MutableTupleQueryResult(org.eclipse.rdf4j.query.impl.MutableTupleQueryResult)

Example 3 with MutableTupleQueryResult

use of org.eclipse.rdf4j.query.impl.MutableTupleQueryResult in project rdf4j by eclipse.

the class QueryResultsTest method setUp.

@Before
public void setUp() {
    tqr1 = new MutableTupleQueryResult(twoBindingNames);
    tqr2 = new MutableTupleQueryResult(twoBindingNames);
    tqr3 = new MutableTupleQueryResult(threeBindingNames);
    gqr = new StubGraphQueryResult();
    foo = VF.createIRI("http://example.org/foo");
    bar = VF.createIRI("http://example.org/bar");
    bnode1 = VF.createBNode();
    bnode2 = VF.createBNode();
    lit1 = VF.createLiteral(1);
    lit2 = VF.createLiteral("test", "en");
}
Also used : MutableTupleQueryResult(org.eclipse.rdf4j.query.impl.MutableTupleQueryResult) Before(org.junit.Before)

Aggregations

MutableTupleQueryResult (org.eclipse.rdf4j.query.impl.MutableTupleQueryResult)3 Before (org.junit.Before)1