assertEquals("AZZ", model.getColumnName(1377));
assertEquals("BAA", model.getColumnName(1378));
}
public void testDefaultTableModel() {
DefaultTableModel model = createEmployeeTableModel();
assertEquals("Employee Name", model.getColumnName(0));
assertEquals("Age", model.getColumnName(1));
assertEquals("Manager", model.getColumnName(2));
assertEquals(3, model.getColumnCount());
assertEquals(5, model.getRowCount());
assertEquals("Bob Johnson", model.getValueAt(0, 0));
assertEquals("Xavier Doe", model.getValueAt(0, 4));
assertEquals(new Integer(21), model.getValueAt(1, 3));
assertEquals(Boolean.FALSE, model.getValueAt(2, 3));
model.deleteRow(1);
assertEquals(4, model.getRowCount());
assertEquals("Bob Johnson", model.getValueAt(0, 0));
assertEquals("Xavier Doe", model.getValueAt(0, 3));
assertEquals(new Integer(21), model.getValueAt(1, 2));
assertEquals(Boolean.FALSE, model.getValueAt(2, 2));
model.insertRow(2, new Object[]{"Whitney Ford", new Integer(33), Boolean.FALSE});
assertEquals(5, model.getRowCount());
assertEquals("Whitney Ford", model.getValueAt(0, 2));
assertEquals("Bob Johnson", model.getValueAt(0, 0));
assertEquals("Xavier Doe", model.getValueAt(0, 4));
assertEquals(new Integer(21), model.getValueAt(1, 3));
assertEquals(Boolean.FALSE, model.getValueAt(2, 3));
}