Rename to Loc test. Now using LoC data
authorDennis Schafroth <dennis@indexdata.com>
Wed, 22 Feb 2012 14:42:17 +0000 (15:42 +0100)
committerDennis Schafroth <dennis@indexdata.com>
Wed, 22 Feb 2012 14:42:17 +0000 (15:42 +0100)
src/org/marc4j/test/WriterTest.java

index af5e1a0..830e50a 100644 (file)
@@ -6,6 +6,7 @@ import java.io.File;
 import java.io.FileOutputStream;\r
 import java.io.InputStream;\r
 import java.io.InputStreamReader;\r
+import java.io.OutputStream;\r
 import java.io.PrintStream;\r
 import java.io.StringReader;\r
 \r
@@ -71,17 +72,21 @@ public class WriterTest extends TestCase {
       System.out.println("");\r
     }\r
 \r
-    public void testTurboMarcXmlWriterAutoGraphics() throws Exception {\r
-      InputStream input = getClass().getResourceAsStream("resources/auto-graphics.mrc");\r
-      MarcWriter writer = new TurboMarcXmlWriter(new FileOutputStream( new File("auto-graphics.txml")), true);\r
+    public void testDummyLoadLoC10K() throws Exception {\r
+      @SuppressWarnings("unused")\r
+      InputStream input = getClass().getResourceAsStream("resources/loc-10k-0000001.mrc");\r
+    }\r
+    \r
+    public void testMarcXmlWriterLoC10K() throws Exception {\r
+      InputStream input = getClass().getResourceAsStream("resources/loc-10k-0000001.mrc");\r
+      MarcWriter writer = new MarcXmlWriter(new FileOutputStream( new File("auto-graphics.txml")), true);\r
       MarcStreamReader reader = new MarcStreamReader(input);\r
       doReadWrite(writer, reader);\r
       input.close();\r
     }\r
-\r
-    public void testMarcXmlWriterAutoGraphics() throws Exception {\r
-      InputStream input = getClass().getResourceAsStream("resources/auto-graphics.mrc");\r
-      MarcWriter writer = new MarcXmlWriter(new FileOutputStream( new File("auto-graphics.txml")), true);\r
+    public void testTurboMarcXmlWriterLoC10K() throws Exception {\r
+      InputStream input = getClass().getResourceAsStream("resources/loc-10k-0000001.mrc");\r
+      MarcWriter writer = new TurboMarcXmlWriter(new FileOutputStream( new File("auto-graphics.txml")), true);\r
       MarcStreamReader reader = new MarcStreamReader(input);\r
       doReadWrite(writer, reader);\r
       input.close();\r
@@ -114,10 +119,11 @@ public class WriterTest extends TestCase {
     }\r
 \r
     \r
-    public void testMarcXmlWriterAutoGraphics2pz() throws Exception {\r
-      InputStream input = getClass().getResourceAsStream("resources/auto-graphics.mrc");\r
+    public void testMarcXmlWriterLoC10K2pz() throws Exception {\r
+      InputStream input = getClass().getResourceAsStream("resources/loc-10k-0000001.mrc");\r
       PrintStream devNull = new java.io.PrintStream ( new java.io.OutputStream ( ) { public void write ( int b ) { } });\r
-      StreamResult result = new StreamResult(new FileOutputStream("autographics.xml"));\r
+      OutputStream file = new FileOutputStream("loc10k.xml");\r
+      StreamResult result = new StreamResult(file);\r
       MarcWriter writer = new MarcXmlWriter(result, new StreamSource(new InputStreamReader(getClass().getResourceAsStream("resources/marc21.xsl"))));\r
       \r
       MarcStreamReader reader = new MarcStreamReader(input);\r
@@ -125,10 +131,11 @@ public class WriterTest extends TestCase {
       input.close();\r
     }\r
 \r
-    public void testTurboMarcXmlWriterAutoGraphics2pz() throws Exception {\r
-      InputStream input = getClass().getResourceAsStream("resources/auto-graphics.mrc");\r
+    public void testTurboMarcXmlWriterLoC10K2pz() throws Exception {\r
+      InputStream input = getClass().getResourceAsStream("resources/loc-10k-0000001.mrc");\r
       PrintStream devNull = new java.io.PrintStream ( new java.io.OutputStream ( ) { public void write ( int b ) { } });\r
-      StreamResult result = new StreamResult(new FileOutputStream("autographics.txml"));\r
+      OutputStream file = new FileOutputStream("loc10k.txml");\r
+      StreamResult result = new StreamResult(file);\r
       MarcWriter writer = new TurboMarcXmlWriter(result, new StreamSource(new InputStreamReader(getClass().getResourceAsStream("resources/tmarc.xsl"))));      \r
       MarcStreamReader reader = new MarcStreamReader(input);\r
       doReadWrite(writer, reader);\r