clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1500596 - /clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java
Date Mon, 08 Jul 2013 07:36:13 GMT
Author: reto
Date: Mon Jul  8 07:36:13 2013
New Revision: 1500596

URL: http://svn.apache.org/r1500596
Log:
Added test showing that baseGraph.clear works

Modified:
    clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java

Modified: clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java
URL: http://svn.apache.org/viewvc/clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java?rev=1500596&r1=1500595&r2=1500596&view=diff
==============================================================================
--- clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java
(original)
+++ clerezza/trunk/rdf.cris/core/src/test/java/org/apache/clerezza/rdf/cris/GraphIndexerTest.java
Mon Jul  8 07:36:13 2013
@@ -219,6 +219,25 @@ public class GraphIndexerTest {
         } catch (InterruptedException ex) {
         }
     }
+    
+    @Test
+    public void clearGraph() {
+        try {
+            GraphNode node = new GraphNode(new UriRef(Util.createURN5()), dataGraph);
+            node.addPropertyValue(FOAF.firstName, "Another Jane");
+            node.addPropertyValue(FOAF.lastName, "Samsing");
+            node.addProperty(RDF.type, FOAF.Person);
+            Thread.sleep(1000);
+            List<NonLiteral> results = service.findResources(FOAF.firstName, "*Jane*");
+            Assert.assertEquals(3, results.size());
+            dataGraph.clear();
+            Thread.sleep(1000);
+            List<NonLiteral> results2 = service.findResources(FOAF.firstName, "*Jane*");
+            Assert.assertEquals(0, results2.size());
+        } catch (ParseException ex) {
+        } catch (InterruptedException ex) {
+        }
+    }
 
     @Test
     public void reIndexWithoutActualChange() throws InterruptedException {



Mime
View raw message