FileDocCategorySizeDatePackage
TestBasicTable.javaAPI DocApache Lucene 1.92042Mon Feb 20 09:18:14 GMT 2006org.apache.lucene.swing.models

TestBasicTable

public class TestBasicTable extends TestCase
author
Jonathan Simon - jonathan_s_simon@yahoo.com

Fields Summary
private TableModel
baseTableModel
private TableSearcher
tableSearcher
private ArrayList
list
Constructors Summary
Methods Summary
protected voidsetUp()

        list = new ArrayList();
        list.add(DataStore.canolis);
        list.add(DataStore.chris);

        baseTableModel = new BaseTableModel(list.iterator());
        tableSearcher = new TableSearcher(baseTableModel);
    
public voidtestColumns()


        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 voidtestRows()

        assertEquals(list.size(), tableSearcher.getRowCount());
    
public voidtestValueAt()

        assertEquals(baseTableModel.getValueAt(0,0), tableSearcher.getValueAt(0,0));
        assertEquals(baseTableModel.getValueAt(0,3), tableSearcher.getValueAt(0,3));