You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/11/04 01:01:24 UTC

incubator-commonsrdf git commit: More neutral graph2-test

Repository: incubator-commonsrdf
Updated Branches:
  refs/heads/master 30dda0825 -> 89f532838


More neutral graph2-test


Project: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/commit/89f53283
Tree: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/tree/89f53283
Diff: http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/diff/89f53283

Branch: refs/heads/master
Commit: 89f5328388dcac1d2ea22f0c3cfc32b4cbfc6154
Parents: 30dda08
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Fri Nov 4 01:01:12 2016 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Fri Nov 4 01:01:12 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/commons/rdf/api/AbstractDatasetTest.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/89f53283/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java b/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
index a8e321c..7f9219d 100644
--- a/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
+++ b/api/src/test/java/org/apache/commons/rdf/api/AbstractDatasetTest.java
@@ -473,8 +473,12 @@ public abstract class AbstractDatasetTest {
     public void getGraphNames() throws Exception {
         Set<BlankNodeOrIRI> names = dataset.getGraphNames().collect(Collectors.toSet());        
         assertTrue("Can't find graph name " + graph1, names.contains(graph1));
-        assertTrue("Can't find graph name " + graph2, names.contains(graph2));
-
+        
+        Optional<BlankNodeOrIRI> graphName2 = dataset.getGraphNames().filter(BlankNode.class::isInstance).findAny();
+        assertTrue("Could not find graph2-like BlankNode", graphName2.isPresent()); 
+        Graph g = dataset.getGraph(graphName2.get()).get();
+        assertEquals(4, g.size());
+    
         // Some implementations like Virtuoso might have additional internal graphs,
         // so we can't assume this:
         //assertEquals(2, names.size());