package com.hida.dao;

import javax.sql.DataSource;
 
import org.dbunit.database.DatabaseDataSourceConnection;
import org.dbunit.database.IDatabaseConnection;
import org.dbunit.dataset.IDataSet;
import org.dbunit.operation.DatabaseOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.testng.annotations.BeforeMethod; 
import com.hida.configuration.HibernateTestConfiguration;
import com.hida.configuration.HsqlDataTypeFactory;
import org.dbunit.database.DatabaseConfig;
 
 
/**
 * 
 * @author lruffin
 */
@ContextConfiguration(classes = { HibernateTestConfiguration.class })
public abstract class EntityDaoImplTest extends AbstractTransactionalTestNGSpringContextTests {
 
    @Autowired
    DataSource dataSource;
 
    @BeforeMethod
    public void setUp() throws Exception {
        IDatabaseConnection dbConn = new DatabaseDataSourceConnection(dataSource);
        
        DatabaseConfig config = dbConn.getConfig();
	config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new HsqlDataTypeFactory());
        
        DatabaseOperation.CLEAN_INSERT.execute(dbConn, getDataSet());
    }
     
    protected abstract IDataSet getDataSet() throws Exception;
 
}

@@ -45,18 +45,16 @@
 Source;%0A
- %0A
 import o
@@ -495,17 +495,16 @@
 eMethod;
- 
 %0Aimport 
@@ -652,19 +652,16 @@
 ig;%0A
- %0A 
 %0A/**%0A * 
 %0A * 
@@ -656,16 +656,172 @@
 %0A/**%0A * 
+A DaoTest class that all Dao test class should extend from. Also adds the%0A * Hsql factory to the database configuration to fix the boolean data type bug.%0A *
 %0A * @aut
@@ -869,17 +869,16 @@
 sses = %7B
- 
 Hibernat
@@ -901,17 +901,16 @@
 on.class
- 
 %7D)%0Apubli
@@ -1000,17 +1000,16 @@
 Tests %7B%0A
- 
 %0A    @Au
@@ -1043,17 +1043,99 @@
 Source;%0A
- 
+%0A    /**%0A     * Setup an in-memory database%0A     *%0A     * @throws Exception%0A     */
 %0A    @Be
@@ -1271,24 +1271,16 @@
 ource);%0A
-        
 %0A       
@@ -1328,9 +1328,16 @@
 ();%0A
-%09
+        
 conf
@@ -1421,24 +1421,16 @@
 ory());%0A
-        
 %0A       
@@ -1498,21 +1498,16 @@
 ;%0A    %7D%0A
-     
 %0A    pro
@@ -1562,12 +1562,11 @@
 eption;%0A
- 
 %0A%7D%0A

Add javadocs to EntityDaoImplTest