Removed the table names from the persistence unit description.
[utils] / test / enterprise / src / test / java / org / wamblee / support / persistence / DatabaseUtilsLeakTest.java
index 75cabee6da1e6ecd82a9456c36b5c4f0761c98bf..b7770b0a53ff6d6ecaa4578fc8d5e3cbc8874432 100644 (file)
@@ -1,15 +1,13 @@
 package org.wamblee.support.persistence;
 
+import static junit.framework.Assert.*;
+
 import javax.sql.DataSource;
 
-import org.dbunit.dataset.DataSetException;
-import org.dbunit.dataset.filter.ITableFilterSimple;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static junit.framework.TestCase.*;
-
 public class DatabaseUtilsLeakTest {
 
     private Database db;
@@ -20,12 +18,7 @@ public class DatabaseUtilsLeakTest {
         db = DatabaseBuilder.getDatabase();
         DataSource ds = db.start(); 
         
-        dbutils = new DatabaseUtils(ds, new ITableFilterSimple() {
-            @Override
-            public boolean accept(String aTableName) throws DataSetException {
-                return false; 
-            }
-        });
+        dbutils = new DatabaseUtils(ds);
     }
     
     @After
@@ -36,7 +29,7 @@ public class DatabaseUtilsLeakTest {
     @Test
     public void testLeak() throws Exception {
         assertEquals(0, db.getActiveConnections()); 
-        dbutils.dropTables();
+        dbutils.dropTables(new MyTables());
         assertEquals(0, db.getActiveConnections());
     }