FileDocCategorySizeDatePackage
TestBasicTable.javaAPI DocApache Lucene 2.0.02014Fri May 26 09:53:46 BST 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));