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/06/22 17:34:01 UTC
svn commit: r1138507 -
/incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EasyGraphTest.scala
Author: reto
Date: Wed Jun 22 15:34:01 2011
New Revision: 1138507
URL: http://svn.apache.org/viewvc?rev=1138507&view=rev
Log:
CLEREZZA-510: replaced wrong assertNotSame test, added size test to fail earlier, added language-tag in new syntax versions
Modified:
incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EasyGraphTest.scala
Modified: incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EasyGraphTest.scala
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EasyGraphTest.scala?rev=1138507&r1=1138506&r2=1138507&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EasyGraphTest.scala (original)
+++ incubator/clerezza/trunk/parent/rdf.scala.utils/src/test/scala/org/apache/clerezza/rdf/scala/utils/EasyGraphTest.scala Wed Jun 22 15:34:01 2011
@@ -111,15 +111,15 @@ class EasyGraphTest {
â FOAF.knows ⶠez.bnode("danny")
)
â FOAF.knows ⶠ(ez.bnode("danny") â FOAF.Person
- â FOAF.name ⶠ"Danny Ayers"
+ â FOAF.name ⶠ"Danny Ayers".lang('en)
â FOAF.knows ⶠ"http://bblfish.net/#hjs".uri //knows
â FOAF.knows ⶠez.bnode("reto")
)
)
-
- Assert.assertEquals("Both graphs should contain exactly the same triples",ez, tinyGraph)
+ Assert.assertEquals("Both graphs should have the same size",tinyGraph.size, ez.size)
+ Assert.assertEquals("Both graphs should contain exactly the same triples", tinyGraph, ez.getGraph)
ez.bnode("danny") â FOAF.name ⶠ"George"
- Assert.assertNotSame("Added one more triple, so graphs should no longer be equal",ez, tinyGraph)
+ Assert.assertFalse("Added one more triple, so graphs should no longer be equal",tinyGraph.equals(ez.getGraph))
}
@Test
@@ -144,14 +144,15 @@ class EasyGraphTest {
-- FOAF.knows --> ez.bnode("danny")
)
-- FOAF.knows --> (ez.bnode("danny").a(FOAF.Person)
- -- FOAF.name --> "Danny Ayers"
+ -- FOAF.name --> "Danny Ayers".lang('en)
-- FOAF.knows --> "http://bblfish.net/#hjs".uri //knows
-- FOAF.knows --> ez.bnode("reto")
)
)
+ Assert.assertEquals("Both graphs should have the same size",tinyGraph.size, ez.size)
Assert.assertEquals("Both graphs should contain exactly the same triples",tinyGraph, ez.getGraph)
ez.bnode("danny") -- FOAF.name --> "George"
- Assert.assertNotSame("Added one more triple, so graphs should no longer be equal", tinyGraph, ez.getGraph)
+ Assert.assertFalse("Added one more triple, so graphs should no longer be equal",tinyGraph.equals(ez.getGraph))
}