// 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;
			Assert.assertEquals(0, header.fieldArray[1].getSetFieldsFlag());
			Assert.assertEquals(0, header.fieldArray[1].getWorkAreaId());
			
		}
		finally {
			DBFUtils.close(reader);
		}
	}
	@Test
	public void testToString () throws IOException {
		File file = new File("src/test/resources/books.dbf");
		DBFReader reader = null;
		try {
			reader = new DBFReader(new FileInputStream(file));
		
			String expected = "1996/7/25\n" +
				"Total records: 10\n" + 
				"Header length: 648\n" + 
				"Columns:\n" + 
				"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";
// 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;

			Assert.assertEquals(0, header.fieldArray[1].getSetFieldsFlag());
			Assert.assertEquals(0, header.fieldArray[1].getWorkAreaId());
			
		}
		finally {
			DBFUtils.close(reader);
		}
	}
	@Test
	public void testToString () throws IOException {
		File file = new File("src/test/resources/books.dbf");
		DBFReader reader = null;
		try {
			reader = new DBFReader(new FileInputStream(file));
		
			String expected = "1996/7/25\n" +
				"Total records: 10\n" + 
				"Header length: 648\n" + 
				"Columns:\n" + 
				"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());