// Path: src/test/java/com/linuxense/javadbf/testutils/DateUtils.java
// public static Date createDate(int year, int month, int day) {
// 	Calendar c = Calendar.getInstance();
// 	c.set(Calendar.YEAR, year);
// 	c.set(Calendar.MONTH, month  - 1);
// 	c.set(Calendar.DAY_OF_MONTH, day);
// 	c.set(Calendar.HOUR_OF_DAY, 0);
// 	c.set(Calendar.MINUTE, 0);
// 	c.set(Calendar.SECOND, 0);
// 	c.set(Calendar.MILLISECOND, 0);
// 	return c.getTime();
// }


import static com.linuxense.javadbf.testutils.DateUtils.createDate;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.Date;
import org.junit.Assert;
import org.junit.Test;
			Assert.assertEquals(DBFDataType.DATE, header.fieldArray[2].getType());
			Assert.assertEquals(0, header.fieldArray[2].getDecimalCount());
			Assert.assertEquals(8, header.fieldArray[2].getLength());
			
			Assert.assertEquals("LOGICAL", header.fieldArray[3].getName());
			Assert.assertEquals(DBFDataType.LOGICAL, header.fieldArray[3].getType());
			Assert.assertEquals(0, header.fieldArray[3].getDecimalCount());
			Assert.assertEquals(1, header.fieldArray[3].getLength());	
			
			Assert.assertEquals("FLOAT", header.fieldArray[4].getName());
			Assert.assertEquals(DBFDataType.FLOATING_POINT, header.fieldArray[4].getType());
			Assert.assertEquals(18, header.fieldArray[4].getDecimalCount());
			Assert.assertEquals(20, header.fieldArray[4].getLength());
			
			Assert.assertEquals("MEMO", header.fieldArray[5].getName());
			Assert.assertEquals(DBFDataType.MEMO, header.fieldArray[5].getType());
			Assert.assertEquals(0, header.fieldArray[5].getDecimalCount());
			Assert.assertEquals(10, header.fieldArray[5].getLength());	
			
			Assert.assertEquals(10, header.numberOfRecords);
			
			
			Object[] row = null;
			
			
			row = reader.nextRecord();
			Assert.assertEquals("One", row[0]);
			Assert.assertTrue(row[1] instanceof Number);
			Assert.assertEquals(1, ((Number)row[1]).intValue());
			Assert.assertTrue(row[2] instanceof Date);
// Path: src/test/java/com/linuxense/javadbf/testutils/DateUtils.java
// public static Date createDate(int year, int month, int day) {
// 	Calendar c = Calendar.getInstance();
// 	c.set(Calendar.YEAR, year);
// 	c.set(Calendar.MONTH, month  - 1);
// 	c.set(Calendar.DAY_OF_MONTH, day);
// 	c.set(Calendar.HOUR_OF_DAY, 0);
// 	c.set(Calendar.MINUTE, 0);
// 	c.set(Calendar.SECOND, 0);
// 	c.set(Calendar.MILLISECOND, 0);
// 	return c.getTime();
// }


// Path: src/test/java/com/linuxense/javadbf/FixtureDBase8bTest.java
import static com.linuxense.javadbf.testutils.DateUtils.createDate;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.util.Date;
import org.junit.Assert;
import org.junit.Test;

			Assert.assertEquals(DBFDataType.DATE, header.fieldArray[2].getType());
			Assert.assertEquals(0, header.fieldArray[2].getDecimalCount());
			Assert.assertEquals(8, header.fieldArray[2].getLength());
			
			Assert.assertEquals("LOGICAL", header.fieldArray[3].getName());
			Assert.assertEquals(DBFDataType.LOGICAL, header.fieldArray[3].getType());
			Assert.assertEquals(0, header.fieldArray[3].getDecimalCount());
			Assert.assertEquals(1, header.fieldArray[3].getLength());	
			
			Assert.assertEquals("FLOAT", header.fieldArray[4].getName());
			Assert.assertEquals(DBFDataType.FLOATING_POINT, header.fieldArray[4].getType());
			Assert.assertEquals(18, header.fieldArray[4].getDecimalCount());
			Assert.assertEquals(20, header.fieldArray[4].getLength());
			
			Assert.assertEquals("MEMO", header.fieldArray[5].getName());
			Assert.assertEquals(DBFDataType.MEMO, header.fieldArray[5].getType());
			Assert.assertEquals(0, header.fieldArray[5].getDecimalCount());
			Assert.assertEquals(10, header.fieldArray[5].getLength());	
			
			Assert.assertEquals(10, header.numberOfRecords);
			
			
			Object[] row = null;
			
			
			row = reader.nextRecord();
			Assert.assertEquals("One", row[0]);
			Assert.assertTrue(row[1] instanceof Number);
			Assert.assertEquals(1, ((Number)row[1]).intValue());
			Assert.assertTrue(row[2] instanceof Date);
			Assert.assertEquals(createDate(1970,1,1), row[2]);