You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by st...@apache.org on 2017/02/16 11:56:26 UTC
[11/12] commons-rdf git commit: COMMONSRDF-47: Avoid hard-coded
RDFSyntax names
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/master
Commit: fbd72a9173b35d73c27af068ca75bdd44c3045f0
Parents: 92998b3
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Sat Feb 11 00:24:25 2017 +0000
Committer: Stian Soiland-Reyes <st...@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"));
}