|
From: <lh...@us...> - 2009-08-02 13:33:10
|
Revision: 342
http://tinytim.svn.sourceforge.net/tinytim/?rev=342&view=rev
Author: lheuer
Date: 2009-08-02 13:33:01 +0000 (Sun, 02 Aug 2009)
Log Message:
-----------
Test cases for RDF/XML and N-Triples
Modified Paths:
--------------
tinytim-mio/trunk/src/test/java/org/tinytim/mio/AllTests.java
Added Paths:
-----------
tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestNTriplesTopicMapReader.java
tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestRDFXMLTopicMapReader.java
Modified: tinytim-mio/trunk/src/test/java/org/tinytim/mio/AllTests.java
===================================================================
--- tinytim-mio/trunk/src/test/java/org/tinytim/mio/AllTests.java 2009-07-29 10:37:58 UTC (rev 341)
+++ tinytim-mio/trunk/src/test/java/org/tinytim/mio/AllTests.java 2009-08-02 13:33:01 UTC (rev 342)
@@ -33,6 +33,8 @@
TestSuite suite = new TestSuite();
suite.addTest(TestJTMTopicMapReader.suite());
suite.addTest(TestN3TopicMapReader.suite());
+ suite.addTest(TestNTriplesTopicMapReader.suite());
+ suite.addTest(TestRDFXMLTopicMapReader.suite());
suite.addTest(TestLTMTopicMapReader.suite());
suite.addTest(TestTMXMLTopicMapReader.suite());
suite.addTest(TestTMXMLValidatingTopicMapReader.suite());
Added: tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestNTriplesTopicMapReader.java
===================================================================
--- tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestNTriplesTopicMapReader.java (rev 0)
+++ tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestNTriplesTopicMapReader.java 2009-08-02 13:33:01 UTC (rev 342)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2008 Lars Heuer (heuer[at]semagia.com)
+ *
+ * Licensed 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.tinytim.mio;
+
+import java.net.URL;
+
+import org.tmapi.core.TopicMap;
+
+import com.semagia.mio.Source;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ *
+ * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a>
+ * @version $Rev:$ - $Date:$
+ */
+public class TestNTriplesTopicMapReader extends TestSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+ for (URL url: CXTMTestUtils.filterValidFiles("rdf", "nt")) {
+ suite.addTest(new TestNTriplesTopicMapReaderCase(url, "rdf"));
+ }
+ return suite;
+ }
+
+ private static class TestNTriplesTopicMapReaderCase extends AbstractCXTMTestCase {
+
+ protected TestNTriplesTopicMapReaderCase(URL url, String subdir) {
+ super(url, subdir);
+ }
+
+ /* (non-Javadoc)
+ * @see org.tinytim.mio.AbstractCXTMTestCase#makeReader(org.tmapi.core.TopicMap, java.net.URL)
+ */
+ @Override
+ protected TopicMapReader makeReader(TopicMap tm, URL file) throws Exception {
+ NTriplesTopicMapReader reader = new NTriplesTopicMapReader(tm, new Source(file.toURI().toString()));
+ return reader;
+ }
+
+ }
+}
Property changes on: tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestNTriplesTopicMapReader.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date Id
Added: svn:eol-style
+ native
Added: tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestRDFXMLTopicMapReader.java
===================================================================
--- tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestRDFXMLTopicMapReader.java (rev 0)
+++ tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestRDFXMLTopicMapReader.java 2009-08-02 13:33:01 UTC (rev 342)
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2008 Lars Heuer (heuer[at]semagia.com)
+ *
+ * Licensed 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.tinytim.mio;
+
+import java.net.URL;
+
+import org.tmapi.core.TopicMap;
+
+import com.semagia.mio.Source;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ *
+ *
+ * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a>
+ * @version $Rev:$ - $Date:$
+ */
+public class TestRDFXMLTopicMapReader extends TestSuite {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+ for (URL url: CXTMTestUtils.filterValidFiles("rdf", "rdf")) {
+ suite.addTest(new TestRDFXMLTopicMapReaderCase(url, "rdf"));
+ }
+ return suite;
+ }
+
+ private static class TestRDFXMLTopicMapReaderCase extends AbstractCXTMTestCase {
+
+ protected TestRDFXMLTopicMapReaderCase(URL url, String subdir) {
+ super(url, subdir);
+ }
+
+ /* (non-Javadoc)
+ * @see org.tinytim.mio.AbstractCXTMTestCase#makeReader(org.tmapi.core.TopicMap, java.net.URL)
+ */
+ @Override
+ protected TopicMapReader makeReader(TopicMap tm, URL file) throws Exception {
+ RDFXMLTopicMapReader reader = new RDFXMLTopicMapReader(tm, new Source(file.toURI().toString()));
+ return reader;
+ }
+
+ }
+}
Property changes on: tinytim-mio/trunk/src/test/java/org/tinytim/mio/TestRDFXMLTopicMapReader.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date Id
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|