jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1452765 - in /jena/branches/arq-riot-output/src: main/java/org/apache/jena/riot/ test/java/org/apache/jena/riot/ test/java/org/apache/jena/riot/lang/ test/java/org/apache/jena/riot/writer/
Date Tue, 05 Mar 2013 12:23:25 GMT
Author: andy
Date: Tue Mar  5 12:23:25 2013
New Revision: 1452765

URL: http://svn.apache.org/r1452765
Log:
Tests do not need to write/unwire the RIOT subsystem anymore.

Modified:
    jena/branches/arq-riot-output/src/main/java/org/apache/jena/riot/IO_Jena.java
    jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/TC_Riot.java
    jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TS_Lang.java
    jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TestLangRdfJson.java
    jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/writer/TestJenaWriters.java

Modified: jena/branches/arq-riot-output/src/main/java/org/apache/jena/riot/IO_Jena.java
URL: http://svn.apache.org/viewvc/jena/branches/arq-riot-output/src/main/java/org/apache/jena/riot/IO_Jena.java?rev=1452765&r1=1452764&r2=1452765&view=diff
==============================================================================
--- jena/branches/arq-riot-output/src/main/java/org/apache/jena/riot/IO_Jena.java (original)
+++ jena/branches/arq-riot-output/src/main/java/org/apache/jena/riot/IO_Jena.java Tue Mar
 5 12:23:25 2013
@@ -84,8 +84,8 @@ public class IO_Jena
         RDFReaderFImpl.setBaseReaderClassName("Turtle", jenaTurtleReader) ;
         RDFReaderFImpl.setBaseReaderClassName("TTL",    jenaTurtleReader) ;
 
-        RDFReaderFImpl.setBaseReaderClassName("RDF/JSON", "") ;
-        RDFWriterFImpl.setBaseWriterClassName("RDF/JSON", "") ;
+        RDFReaderFImpl.setBaseReaderClassName("RDF/JSON", null) ;
+        RDFWriterFImpl.setBaseWriterClassName("RDFJSON",  null) ;
     }
     
     /** Register for use with Model.read **/ 

Modified: jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/TC_Riot.java
URL: http://svn.apache.org/viewvc/jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/TC_Riot.java?rev=1452765&r1=1452764&r2=1452765&view=diff
==============================================================================
--- jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/TC_Riot.java (original)
+++ jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/TC_Riot.java Tue Mar
 5 12:23:25 2013
@@ -32,20 +32,16 @@ import org.junit.runners.Suite ;
 
 @RunWith(Suite.class)
 @Suite.SuiteClasses( {
-    // Old world - org.openjena.riot
     TS_Out.class
-
-    // New world - org.apache.jena.riot
     , TS_Lang.class
     , TS_LangSuite.class
     , TS_ReaderRIOT.class
     , TS_IO2.class
     , TS_RIOTAdapters.class
     , TS_Process.class
-    //, TS_RiotMisc.class
+    , TS_RiotWriter.class
     , TS_RiotSystem.class
     , TS_RiotWeb.class
-    , TS_RiotWriter.class
 })
 
 

Modified: jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TS_Lang.java
URL: http://svn.apache.org/viewvc/jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TS_Lang.java?rev=1452765&r1=1452764&r2=1452765&view=diff
==============================================================================
--- jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TS_Lang.java (original)
+++ jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TS_Lang.java Tue
Mar  5 12:23:25 2013
@@ -29,7 +29,6 @@ import org.junit.runners.Suite ;
      TestIRI.class
     , TestLang.class
     , TestNodeAllocator.class
-    
     , TestTurtleTerms.class
     , TestLangNTriples.class
     , TestLangNQuads.class
@@ -37,7 +36,6 @@ import org.junit.runners.Suite ;
     , TestLangTrig.class
     , TestLangRdfJson.class
     , TestParserFactory.class
-
     , TestPipedRDFIterators.class
 })
 

Modified: jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TestLangRdfJson.java
URL: http://svn.apache.org/viewvc/jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TestLangRdfJson.java?rev=1452765&r1=1452764&r2=1452765&view=diff
==============================================================================
--- jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TestLangRdfJson.java
(original)
+++ jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/lang/TestLangRdfJson.java
Tue Mar  5 12:23:25 2013
@@ -25,15 +25,12 @@ import org.apache.jena.atlas.io.PeekRead
 import org.apache.jena.atlas.json.io.parser.TokenizerJSON ;
 import org.apache.jena.atlas.junit.BaseTest ;
 import org.apache.jena.atlas.lib.StrUtils ;
-import org.apache.jena.riot.* ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ErrorHandlerEx ;
 import org.apache.jena.riot.ErrorHandlerTestLib.ExFatal ;
-import org.apache.jena.riot.lang.LangRDFJSON ;
-import org.apache.jena.riot.lang.RDFParserOutputCounting ;
+import org.apache.jena.riot.* ;
 import org.apache.jena.riot.system.StreamRDFLib ;
 import org.apache.jena.riot.tokens.Tokenizer ;
 import org.apache.jena.riot.tokens.TokenizerFactory ;
-import org.junit.AfterClass ;
 import org.junit.BeforeClass ;
 import org.junit.Test ;
 
@@ -45,14 +42,12 @@ public class TestLangRdfJson extends Bas
 	@BeforeClass
 	public static void setup()
 	{
-		IO_Jena.wireIntoJena();
+	    RIOT.init();
 	}
 	
-	@AfterClass
-	public static void teardown()
-	{
-	    IO_Jena.resetJenaReaders();
-	}
+//	@AfterClass
+//	public static void teardown()
+//	{ }
 	
 	@Test
 	public void rdfjson_get_jena_reader()

Modified: jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/writer/TestJenaWriters.java
URL: http://svn.apache.org/viewvc/jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/writer/TestJenaWriters.java?rev=1452765&r1=1452764&r2=1452765&view=diff
==============================================================================
--- jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/writer/TestJenaWriters.java
(original)
+++ jena/branches/arq-riot-output/src/test/java/org/apache/jena/riot/writer/TestJenaWriters.java
Tue Mar  5 12:23:25 2013
@@ -35,8 +35,6 @@ import com.hp.hpl.jena.rdf.model.Model ;
 @RunWith(Parameterized.class)
 public class TestJenaWriters extends AbstractWriterTest
 {
-    static { IO_Jena2.wireIntoJenaW() ; }
-    
     @Parameters(name = "{index}: {0}")
     public static Iterable<Object[]> data() {
         List<Object[]> x = new ArrayList<Object[]>() ;
@@ -78,10 +76,11 @@ public class TestJenaWriters extends Abs
     
     private void test(String filename) {
         Model m = readModel(filename) ;
-        ByteArrayOutputStream out1 = new ByteArrayOutputStream() ;
-        m.write(out1, jenaFormatName) ;
         ByteArrayOutputStream out2 = new ByteArrayOutputStream() ;
         RDFWriterMgr.write(out2, m, IO_Jena2.getFormatForJenaWriter(jenaFormatName)) ;
+
+        ByteArrayOutputStream out1 = new ByteArrayOutputStream() ;
+        m.write(out1, jenaFormatName) ;
         
         try {
             assertArrayEquals("Format: "+jenaFormatName, out2.toByteArray(), out1.toByteArray())
;



Mime
View raw message