diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2006-09-14 19:24:12 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2006-09-14 19:24:12 +0000 |
commit | fb03eb44f42c9125f7bd20113844273c0ea835ba (patch) | |
tree | d0a74801b65d149ef170efed05ad63936cbb5dc9 /test/src/java | |
parent | 21f83e85b4e98f397478c2415b57c47bbeba0194 (diff) | |
download | jackcess-fb03eb44f42c9125f7bd20113844273c0ea835ba.tar.gz jackcess-fb03eb44f42c9125f7bd20113844273c0ea835ba.zip |
rework current row page tracking with RowState
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@109 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test/src/java')
-rw-r--r-- | test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java index 78dba1b..1a65fcf 100644 --- a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java +++ b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java @@ -26,11 +26,11 @@ public class DatabaseTest extends TestCase { super(name); } - private Database open() throws Exception { + static Database open() throws Exception { return Database.open(new File("test/data/test.mdb")); } - private Database create() throws Exception { + static Database create() throws Exception { File tmp = File.createTempFile("databaseTest", ".mdb"); tmp.deleteOnExit(); return Database.create(tmp); @@ -116,9 +116,10 @@ public class DatabaseTest extends TestCase { checkColumn(columns, 8, "I", DataType.BOOLEAN); } - private void checkColumn(List columns, int columnNumber, String name, + static void checkColumn(List columns, int columnNumber, String name, DataType dataType) - throws Exception { + throws Exception + { Column column = (Column) columns.get(columnNumber); assertEquals(name, column.getName()); assertEquals(dataType, column.getType()); @@ -333,14 +334,6 @@ public class DatabaseTest extends TestCase { assertEquals(expectedPKs, foundPKs); } - private int countRows(Table table) throws Exception { - int rtn = 0; - for(Map<String, Object> row : table) { - rtn++; - } - return rtn; - } - public void testReadWithDeletedCols() throws Exception { Table table = Database.open(new File("test/data/delColTest.mdb")).getTable("Table1"); @@ -554,16 +547,16 @@ public class DatabaseTest extends TestCase { } - private Object[] createTestRow(String col1Val) { + static Object[] createTestRow(String col1Val) { return new Object[] {col1Val, "R", "McCune", 1234, (byte) 0xad, 555.66d, 777.88f, (short) 999, new Date()}; } - private Object[] createTestRow() { + static Object[] createTestRow() { return createTestRow("Tim"); } - private void createTestTable(Database db) throws Exception { + static void createTestTable(Database db) throws Exception { List<Column> columns = new ArrayList<Column>(); Column col = new Column(); col.setName("A"); @@ -604,6 +597,14 @@ public class DatabaseTest extends TestCase { db.createTable("test", columns); } + static int countRows(Table table) throws Exception { + int rtn = 0; + for(Map<String, Object> row : table) { + rtn++; + } + return rtn; + } + static void dumpDatabase(Database mdb) throws Exception { System.out.println("DATABASE:"); for(Table table : mdb) { |