OSDN Git Service

add nowinterceptor
[dbutsuite/dbutsuite.git] / test / jp / co / sourceforge / dbutsuite / datareader / ExcelDataReaderTest.groovy
index 6f11c01..65134ba 100644 (file)
@@ -4,7 +4,7 @@ import org.junit.After
 import org.junit.Before
 import org.junit.Test\rimport org.junit.Assert\r
 import java.text.SimpleDateFormat\rimport jp.co.sourceforge.dbutsuite.model.DataType\rimport junit.framework.Assert
-import jp.co.sourceforge.dbutsuite.datawriter.DatabaseDataWriter\rimport jp.co.sourceforge.dbutsuite.datawriter.H2DatabaseWriter\r\rpublic class ExcelDataReaderTest {
+import jp.co.sourceforge.dbutsuite.datawriter.DatabaseDataWriter\rimport jp.co.sourceforge.dbutsuite.datawriter.H2DatabaseWriter\rimport jp.co.sourceforge.dbutsuite.datawriter.interceptor.NowDateInterceptor\r\rpublic class ExcelDataReaderTest {
        
        /**
         * @throws java.lang.Exception
@@ -44,11 +44,12 @@ import jp.co.sourceforge.dbutsuite.datawriter.DatabaseDataWriter\rimport jp.co.so
                
                Properties props = new Properties()
                props.put(DatabaseDataWriter.JDBC_DRIVER_CLASS, "org.h2.Driver")
-               props.put(DatabaseDataWriter.JDBC_URL, "jdbc:h2:tcp://localhost/C:\\cygwin\\home\\inaba\\h2_db/applicationpattern")
+               props.put(DatabaseDataWriter.JDBC_URL, "jdbc:h2:tcp://localhost/./testdb")
                props.put(DatabaseDataWriter.JDBC_USER, "sa")
                props.put(DatabaseDataWriter.JDBC_PASSWORD, "")
 
                def writer = new H2DatabaseWriter(props)
+               writer.interceptors << new NowDateInterceptor()
                dataobject.name = "TEMP"
                writer.writeExecute(dataobject)
        }