assertEquals("test",
model.getName());
assertEquals(2,
model.getTableCount());
Table someTable = model.getTable(0);
assertEquals("SomeTable",
someTable.getName());
assertEquals("Some table",
someTable.getDescription());
assertEquals(0, someTable.getAutoIncrementColumns().length);
assertEquals(1,
someTable.getColumnCount());
assertEquals(0,
someTable.getForeignKeyCount());
assertEquals(0,
someTable.getIndexCount());
Column pkColumn = someTable.getColumn(0);
assertEquals("ID",
pkColumn.getName());
assertEquals("VARCHAR",
pkColumn.getType());
assertEquals(Types.VARCHAR,
pkColumn.getTypeCode());
assertEquals(16,
pkColumn.getSizeAsInt());
assertTrue(pkColumn.isPrimaryKey());
assertTrue(pkColumn.isRequired());
assertFalse(pkColumn.isAutoIncrement());
assertNull(pkColumn.getDefaultValue());
assertEquals("The primary key",
pkColumn.getDescription());
Table anotherTable = model.getTable(1);
assertEquals("AnotherTable",
anotherTable.getName());
assertEquals("And another table",
anotherTable.getDescription());
assertEquals(0, anotherTable.getAutoIncrementColumns().length);
assertEquals(1,
anotherTable.getColumnCount());
assertEquals(1,
anotherTable.getForeignKeyCount());
assertEquals(0,
anotherTable.getIndexCount());
Column fkColumn = anotherTable.getColumn(0);
assertEquals("Some_ID",
fkColumn.getName());
assertEquals("VARCHAR",
fkColumn.getType());
assertEquals(Types.VARCHAR,
fkColumn.getTypeCode());
assertEquals(16,
fkColumn.getSizeAsInt());
assertFalse(fkColumn.isPrimaryKey());
assertFalse(fkColumn.isRequired());
assertFalse(fkColumn.isAutoIncrement());
assertEquals("The foreign key",
fkColumn.getDescription());
ForeignKey fk = anotherTable.getForeignKey(0);
assertNull(fk.getName());
assertEquals(someTable,
fk.getForeignTable());
assertEquals(someTable.getName(),