You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commonsrdf.apache.org by st...@apache.org on 2016/07/02 16:14:50 UTC

[33/50] [abbrv] incubator-commonsrdf git commit: Simple turtle test

Simple turtle test


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

Branch: refs/heads/jena
Commit: fd5ff89905802f16c63d4ce04c45d8e68c51d2f9
Parents: 3397540
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Mon Mar 28 05:54:32 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Mon Mar 28 05:54:32 2016 +0100

----------------------------------------------------------------------
 .../commons/rdf/jena/TestRDFParserBuilder.java  | 39 ++++++++++++++++++++
 1 file changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-commonsrdf/blob/fd5ff899/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java
----------------------------------------------------------------------
diff --git a/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java b/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java
new file mode 100644
index 0000000..8d15bf1
--- /dev/null
+++ b/jena/src/test/java/org/apache/commons/rdf/jena/TestRDFParserBuilder.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.rdf.jena;
+
+import static org.junit.Assert.*;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.commons.rdf.api.Graph;
+import org.apache.commons.rdf.api.RDFSyntax;
+import org.junit.Test;
+
+public class TestRDFParserBuilder {
+	@Test
+	public void parseTurtle() throws Exception {
+		Path d = Paths.get("D.ttl");
+		Future<Graph> gFuture = new JenaRDFParserBuilder().contentType(RDFSyntax.TURTLE).source(d).parse();
+		Graph g = gFuture.get(5, TimeUnit.SECONDS);
+		assertEquals(3, g.size());
+	}
+}