Extra tests for bulk addInto/deleteFrom.

Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3bbf5a16
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3bbf5a16
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3bbf5a16

Branch: refs/heads/master
Commit: 3bbf5a1604abe6d6664501da66eff477044743c5
Parents: 781895c
Author: Andy Seaborne <[email protected]>
Authored: Sat Jan 28 12:13:16 2017 +0000
Committer: Andy Seaborne <[email protected]>
Committed: Thu Feb 2 14:18:07 2017 +0000

----------------------------------------------------------------------
 .../jena/graph/test/AbstractTestGraph.java      | 32 +++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/3bbf5a16/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java
----------------------------------------------------------------------
diff --git 
a/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java 
b/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java
index 912a257..f03651e 100644
--- a/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java
+++ b/jena-core/src/test/java/org/apache/jena/graph/test/AbstractTestGraph.java
@@ -343,7 +343,7 @@ public abstract class AbstractTestGraph extends 
GraphTestBase
         GraphUtil.delete( g, tripleList );
         assertEquals( "graph has original size", initialSize, g.size() );
     }
-
+    
     public void testAddWithReificationPreamble()
     {
         Graph g = getGraph();
@@ -625,14 +625,44 @@ public abstract class AbstractTestGraph extends 
GraphTestBase
         Graph triples = graphWith( "this type graph; I type slowly" );
         GraphUtil.addInto( g, triples );
         L.assertHas( new Object[] {"addGraph", g, triples} );
+        testContains( g, triples );
+    }
+
+    public void testBulkAddGraph1() {
+        Graph g1 = graphWith( "pigs might fly; dead can dance" );
+        Graph g2 = graphWith( "this type graph" );
+        GraphUtil.addInto( g1, g2 );
+        testContains( g1, g2 );
     }
 
+    public void testBulkAddGraph2() {
+        Graph g1 = graphWith( "this type graph" );
+        Graph g2 = graphWith( "pigs might fly; dead can dance" );
+        GraphUtil.addInto( g1, g2 );
+        testContains( g1, g2);
+    }
+    
     public void testBulkDeleteGraph()
     {        
         Graph g = getAndRegister( L );
         Graph triples = graphWith( "this type graph; I type slowly" );
         GraphUtil.deleteFrom( g, triples );
         L.assertHas( new Object[] {"deleteGraph", g, triples} );
+        testOmits( g, triples );
+    }
+    
+    public void testBulkDeleteGraph1() {
+        Graph g1 = graphWith( "pigs might fly; dead can dance" );
+        Graph g2 = graphWith( "pigs might fly" );
+        GraphUtil.deleteFrom( g1, g2 );
+        testOmits( g1, g2);
+    }
+
+    public void testBulkDeleteGraph2() {
+        Graph g1 = graphWith( "pigs might fly" );
+        Graph g2 = graphWith( "pigs might fly; dead can dance" );
+        GraphUtil.deleteFrom( g1, g2 );
+        testOmits( g1, g2);
     }
 
     public void testGeneralEvent()

Reply via email to