commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject commons-rdf git commit: COMMONSRDF-47: Avoid hard-coded RDFSyntax names
Date Sat, 11 Feb 2017 00:24:50 GMT
Repository: commons-rdf
Updated Branches:
  refs/heads/COMMONSRDF-47 92998b329 -> fbd72a917


COMMONSRDF-47: Avoid hard-coded RDFSyntax names

Project: http://git-wip-us.apache.org/repos/asf/commons-rdf/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-rdf/commit/fbd72a91
Tree: http://git-wip-us.apache.org/repos/asf/commons-rdf/tree/fbd72a91
Diff: http://git-wip-us.apache.org/repos/asf/commons-rdf/diff/fbd72a91

Branch: refs/heads/COMMONSRDF-47
Commit: fbd72a9173b35d73c27af068ca75bdd44c3045f0
Parents: 92998b3
Author: Stian Soiland-Reyes <stain@apache.org>
Authored: Sat Feb 11 00:24:25 2017 +0000
Committer: Stian Soiland-Reyes <stain@apache.org>
Committed: Sat Feb 11 00:24:25 2017 +0000

----------------------------------------------------------------------
 .../rdf/simple/experimental/AbstractRDFParserTest.java    | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-rdf/blob/fbd72a91/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
----------------------------------------------------------------------
diff --git a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
b/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
index 12061ed..098b606 100644
--- a/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
+++ b/simple/src/test/java/org/apache/commons/rdf/simple/experimental/AbstractRDFParserTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
+import static org.apache.commons.rdf.api.RDFSyntax.*;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -162,7 +163,8 @@ public class AbstractRDFParserTest {
         // international characters
         assertEquals("<" + testNt.toUri().toString() + ">", firstPredicate(g, "source"));
         assertEquals("<" + testNt.toUri().toString() + ">", firstPredicate(g, "base"));
-        assertEquals("\"NTRIPLES\"", firstPredicate(g, "contentTypeSyntax"));
+        assertEquals("\"" + RDFSyntax.NTRIPLES.name() + "\"", 
+                firstPredicate(g, "contentTypeSyntax"));
         assertEquals("\"application/n-triples\"", firstPredicate(g, "contentType"));
     }
 
@@ -213,7 +215,8 @@ public class AbstractRDFParserTest {
         // bnode source indicates InputStream
         assertTrue(firstPredicate(g, "source").startsWith("_:"));
         assertEquals("\"application/n-quads\"", firstPredicate(g, "contentType"));
-        assertEquals("\"NQUADS\"", firstPredicate(g, "contentTypeSyntax"));
+        assertEquals("\"" + RDFSyntax.NQUADS.name() + "\"", 
+                firstPredicate(g, "contentTypeSyntax"));
     }
 
     @Test
@@ -243,7 +246,8 @@ public class AbstractRDFParserTest {
         checkGraph(g);
         assertEquals("<http://www.example.net/test.ttl>", firstPredicate(g, "source"));
         assertEquals("<http://www.example.net/test.ttl>", firstPredicate(g, "base"));
-        assertEquals("\"TURTLE\"", firstPredicate(g, "contentTypeSyntax"));
+        assertEquals("\"" + RDFSyntax.TURTLE.name() + "\"", 
+                firstPredicate(g, "contentTypeSyntax"));
         assertEquals("\"text/turtle\"", firstPredicate(g, "contentType"));
     }
 


Mime
View raw message