You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2015/08/24 10:13:41 UTC
[32/50] jena git commit: JENA-491 Fuseki Support: Test
exeConstructDataset() of QueryEngineHTTP
JENA-491 Fuseki Support: Test exeConstructDataset() of
QueryEngineHTTP
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/de1d1c33
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/de1d1c33
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/de1d1c33
Branch: refs/heads/master
Commit: de1d1c33cd64b88d3a56127c4c434c2b39c1e196
Parents: 2bc9fe6
Author: confidencesun <co...@gmail.com>
Authored: Mon Aug 17 21:45:05 2015 +0800
Committer: confidencesun <co...@gmail.com>
Committed: Mon Aug 17 21:54:05 2015 +0800
----------------------------------------------------------------------
.../test/java/org/apache/jena/fuseki/TestQuery.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/de1d1c33/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
index 21f89fc..4cf5b1b 100644
--- a/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
+++ b/jena-fuseki2/jena-fuseki-core/src/test/java/org/apache/jena/fuseki/TestQuery.java
@@ -160,6 +160,20 @@ public class TestQuery extends BaseTest {
}
@Test
+ public void query_construct_quad_02()
+ {
+ String queryString = " CONSTRUCT { GRAPH <http://eg/g> {?s ?p ?oq} } WHERE {?s ?p ?oq}" ;
+ Query query = QueryFactory.create(queryString, Syntax.syntaxARQ);
+
+ try ( QueryExecution qExec = QueryExecutionFactory.sparqlService(serviceQuery, query) ) {
+ Dataset result = qExec.execConstructDataset();
+ Assert.assertTrue(result.asDatasetGraph().find().hasNext());
+ Assert.assertEquals( "http://eg/g", result.asDatasetGraph().find().next().getGraph().getURI());
+
+ }
+ }
+
+ @Test
public void query_construct_01()
{
String query = " CONSTRUCT {?s ?p ?o} WHERE {?s ?p ?o}" ;