You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by wi...@apache.org on 2015/03/27 19:15:21 UTC

[23/50] [abbrv] incubator-commonsrdf git commit: test that creating a "invalid" bnode twice have equal ntriplesString

test that creating a "invalid" bnode twice have equal ntriplesString

(even though it will not contain literally the invalid id)

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

Branch: refs/heads/master
Commit: 65db769d5deb8324c7bb07ddcffbae91eb6b954e
Parents: 804bbd6
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Jan 26 10:41:23 2015 +0000
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Jan 26 10:41:36 2015 +0000

----------------------------------------------------------------------
 .../com/github/commonsrdf/api/AbstractRDFTermFactoryTest.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/65db769d/api/src/test/java/com/github/commonsrdf/api/AbstractRDFTermFactoryTest.java
----------------------------------------------------------------------
diff --git a/api/src/test/java/com/github/commonsrdf/api/AbstractRDFTermFactoryTest.java b/api/src/test/java/com/github/commonsrdf/api/AbstractRDFTermFactoryTest.java
index d73dffe..091571b 100644
--- a/api/src/test/java/com/github/commonsrdf/api/AbstractRDFTermFactoryTest.java
+++ b/api/src/test/java/com/github/commonsrdf/api/AbstractRDFTermFactoryTest.java
@@ -17,7 +17,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
 
 import org.junit.Assume;
 import org.junit.Before;
@@ -352,7 +351,11 @@ public abstract class AbstractRDFTermFactoryTest {
 		}
 		// Factory allows :colon, which is OK as long as it's not causing an
 		// invalid ntriplesString
-		assertFalse(withColon.ntriplesString().contains("with:colon"));		
+		assertFalse(withColon.ntriplesString().contains("with:colon"));
+		
+		// and creating it twice gets the same ntriplesString		
+		assertEquals(withColon.ntriplesString(),
+				factory.createBlankNode("with:colon").ntriplesString());
 	}
 
 	@Test(expected = IllegalArgumentException.class)