// Path: src/test/java/com/linuxense/javadbf/mocks/FailInputStream.java
// public class FailInputStream extends InputStream{
// 
// 	@Override
// 	public int read() throws IOException {
// 		throw new IOException ("fail to read");
// 	}
// 
// }


import static org.junit.Assert.assertNull;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.FailInputStream;
				"BOOK_ID\n" + 
				"TITLE\n" + 
				"TOPIC_ID\n" + 
				"COPYRIGHT_\n" + 
				"ISBN_NUMBE\n" + 
				"PUBLISHER_\n" + 
				"PURCHASE_P\n" + 
				"COVERTYPE\n" + 
				"DATE_PURCH\n" + 
				"PAGES\n" + 
				"NOTES\n";
			Assert.assertEquals(expected, reader.toString());
		}
		finally {
			DBFUtils.close(reader);
		}
	}

	@Test
	public void testReadBooksAddedDeleteField() throws  IOException {
		ReadDBFAssert.testReadDBFFile("books", 12, 10, true);
	}

	@Test
	public void testReadDBFFileDeletedRecords() throws  IOException {
		ReadDBFAssert.testReadDBFFileDeletedRecords("test_delete",3,1);
	}
	
	@Test(expected=DBFException.class)
	public void testFailStream() throws DBFException, IOException{
// Path: src/test/java/com/linuxense/javadbf/mocks/FailInputStream.java
// public class FailInputStream extends InputStream{
// 
// 	@Override
// 	public int read() throws IOException {
// 		throw new IOException ("fail to read");
// 	}
// 
// }


// Path: src/test/java/com/linuxense/javadbf/DBFReaderTest.java
import static org.junit.Assert.assertNull;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
import com.linuxense.javadbf.mocks.FailInputStream;

				"BOOK_ID\n" + 
				"TITLE\n" + 
				"TOPIC_ID\n" + 
				"COPYRIGHT_\n" + 
				"ISBN_NUMBE\n" + 
				"PUBLISHER_\n" + 
				"PURCHASE_P\n" + 
				"COVERTYPE\n" + 
				"DATE_PURCH\n" + 
				"PAGES\n" + 
				"NOTES\n";
			Assert.assertEquals(expected, reader.toString());
		}
		finally {
			DBFUtils.close(reader);
		}
	}

	@Test
	public void testReadBooksAddedDeleteField() throws  IOException {
		ReadDBFAssert.testReadDBFFile("books", 12, 10, true);
	}

	@Test
	public void testReadDBFFileDeletedRecords() throws  IOException {
		ReadDBFAssert.testReadDBFFileDeletedRecords("test_delete",3,1);
	}
	
	@Test(expected=DBFException.class)
	public void testFailStream() throws DBFException, IOException{
		DBFReader reader = null;