From 8fcf60a9d35c501b4d617c03961e0a5bb16966cb Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Wed, 4 Jan 2012 20:17:35 +0100 Subject: [PATCH] Test with/out bad indicators. Need valid test data. --- src/org/marc4j/test/ReaderTest.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/org/marc4j/test/ReaderTest.java b/src/org/marc4j/test/ReaderTest.java index 2150599..25f6bce 100644 --- a/src/org/marc4j/test/ReaderTest.java +++ b/src/org/marc4j/test/ReaderTest.java @@ -13,11 +13,25 @@ import org.marc4j.marc.Record; public class ReaderTest extends TestCase { - public void testMarcStreamReader() throws Exception { + public void testReaderNoSkip() throws Exception { + testMarcStreamReader(false); + } + + public void testWriteAndReadSkip() throws Exception { + testMarcStreamReader(true); + } + + public void testWriteAndReadNoSkip() throws Exception { + testMarcStreamReader(false); + } + + + public void testMarcStreamReader(boolean setBadIndicators) throws Exception { int i = 0; InputStream input = getClass().getResourceAsStream( "resources/chabon.mrc"); MarcStreamReader reader = new MarcStreamReader(input); + reader.setBadIndicators(setBadIndicators); while (reader.hasNext()) { Record record = reader.next(); System.err.println(record.toString()); -- 1.7.10.4