for (final FileFormat fileFormat : SUPPORTED_FILEFORMATS) {
Database db = create(fileFormat);
- if (!FileFormat.V2003.equals(fileFormat)
- && !FileFormat.V2007.equals(fileFormat)) {
+ if (fileFormat.ordinal() < FileFormat.V2003.ordinal()) {
assertNotNull("file format: " + fileFormat, db.getSystemTable("MSysAccessObjects"));
} else {
- // v2003, v2007 template files have no "MSysAccessObjects" table
+ // v2003+ template files have no "MSysAccessObjects" table
assertNull("file format: " + fileFormat, db.getSystemTable("MSysAccessObjects"));
}
final Map<String,Object> row = c.getCurrentRow();
// Row order is arbitrary, so v2007 row order difference is valid
- if (Database.FileFormat.V2007.equals(testDB.getExpectedFileFormat())) {
+ if (testDB.getExpectedFileFormat().ordinal() >=
+ Database.FileFormat.V2007.ordinal()) {
DatabaseTest.checkTestDBTable1RowA(testDB, table, row);
} else {
DatabaseTest.checkTestDBTable1RowABCDEFG(testDB, table, row);
} else if (Database.FileFormat.V2007.equals(expectedFileFormat)) {
expectedFirstPage = 94;
expectedLastPage = 511;
+ } else if (Database.FileFormat.V2010.equals(expectedFileFormat)) {
+ expectedFirstPage = 109;
+ expectedLastPage = 511;
} else {
throw new IllegalAccessException("Unknown file format: " + expectedFileFormat);
}