You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2011/07/01 00:43:41 UTC
svn commit: r1141743 -
/incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala
Author: reto
Date: Thu Jun 30 22:43:41 2011
New Revision: 1141743
URL: http://svn.apache.org/viewvc?rev=1141743&view=rev
Log:
CLEREZZA-510: showing two different ways how triples can be added to an existing graph
Modified:
incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala
Modified: incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala
URL: http://svn.apache.org/viewvc/incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala?rev=1141743&r1=1141742&r2=1141743&view=diff
==============================================================================
--- incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala (original)
+++ incubator/clerezza/issues/CLEREZZA-510-reto/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EzGraphTest.scala Thu Jun 30 22:43:41 2011
@@ -296,10 +296,15 @@ class EzGraphTest {
}
Assert.assertEquals("the two graphs should be of same size",tinyGraph.size(),ez.size())
Assert.assertEquals("Both graphs should contain exactly the same triples",tinyGraph,ez.getGraph)
+ //We can add triples by creating a new anonymous instance
+ new EzGraph(ez) {
+ "http://bblfish.net/#hjs".uri -- FOAF.name --> "William"
+ }
+ Assert.assertEquals("the triple colletion has grown by one",tinyGraph.size()+1,ez.size())
+ //or by just importing it
import ez._
ez.b_("danny") -- FOAF.name --> "George"
- //Assert.assertNotSame("Added one more triple, so graphs should no longer be equal",tinyGraph,ez.graph)
-
+ Assert.assertEquals("the triple colletion has grown by one",tinyGraph.size()+2,ez.size())
}
//
//