parser = new CodeGenParser(config);
}
@Test
public void testLoadDbModel() {
final DBDatabase db = parser.loadDbModel();
final DBTable departments = db.getTable("DEPARTMENTS");
final DBTable employees = db.getTable("EMPLOYEES");
assertNotNull("Expected DEPARTMENTS table.", departments);
assertNotNull("Expected EMPLOYEES table.", employees);
final List<DBRelation> relations = db.getRelations();
assertEquals("Should have two relations.", 2, relations.size());
final DBRelation dbRelation = relations.get(1);
assertEquals("EMPLOYEES_DEPARTMENT_I_FK", dbRelation.getName());