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

TestSearchingTable

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

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

        baseTableModel = new BaseTableModel(DataStore.getRestaurants());
        tableSearcher = new TableSearcher(baseTableModel);
    
public voidtestSearch()

        //make sure data is there
        assertEquals(baseTableModel.getRowCount(), tableSearcher.getRowCount());
        //search for pino's
        tableSearcher.search("pino's");
        assertEquals(1, tableSearcher.getRowCount());
        //clear search and check that
        tableSearcher.search(null);
        assertEquals(baseTableModel.getRowCount(), tableSearcher.getRowCount());