TestBasicTablepublic class TestBasicTable extends TestCase
Fields Summary |
---|
private TableModel | baseTableModel | private TableSearcher | tableSearcher | private ArrayList | list |
Methods Summary |
---|
protected void | setUp()
list = new ArrayList();
list.add(DataStore.canolis);
list.add(DataStore.chris);
baseTableModel = new BaseTableModel(list.iterator());
tableSearcher = new TableSearcher(baseTableModel);
| public void | testColumns()
assertEquals(baseTableModel.getColumnCount(), tableSearcher.getColumnCount());
assertEquals(baseTableModel.getColumnName(0), tableSearcher.getColumnName(0));
assertNotSame(baseTableModel.getColumnName(0), tableSearcher.getColumnName(1));
assertEquals(baseTableModel.getColumnClass(0), tableSearcher.getColumnClass(0));
| public void | testRows()
assertEquals(list.size(), tableSearcher.getRowCount());
| public void | testValueAt()
assertEquals(baseTableModel.getValueAt(0,0), tableSearcher.getValueAt(0,0));
assertEquals(baseTableModel.getValueAt(0,3), tableSearcher.getValueAt(0,3));
|
|