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

TestSearchingList

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

Fields Summary
private ListModel
baseListModel
private ListSearcher
listSearcher
Constructors Summary
Methods Summary
protected voidsetUp()

        baseListModel = new BaseListModel(DataStore.getRestaurants());
        listSearcher = new ListSearcher(baseListModel);
    
public voidtestSearch()

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