Methods Summary |
---|
protected void | setUp()
baseListModel = new BaseListModel(DataStore.getRestaurants());
listSearcher = new ListSearcher(baseListModel);
infoToAdd1 = new RestaurantInfo();
infoToAdd1.setName("Pino's");
infoToAdd2 = new RestaurantInfo();
infoToAdd2.setName("Pino's");
infoToAdd2.setType("Italian");
|
public void | testAddWithSearch()
assertEquals(baseListModel.getSize(), listSearcher.getSize());
listSearcher.search("pino's");
int count = listSearcher.getSize();
baseListModel.addRow(infoToAdd2);
count++;
assertEquals(count, listSearcher.getSize());
|
public void | testAddWithoutSearch()
assertEquals(baseListModel.getSize(), listSearcher.getSize());
int count = listSearcher.getSize();
baseListModel.addRow(infoToAdd1);
count++;
assertEquals(count, listSearcher.getSize());
|
public void | testRemoveWithSearch()
assertEquals(baseListModel.getSize(), listSearcher.getSize());
baseListModel.addRow(infoToAdd1);
listSearcher.search("pino's");
int count = listSearcher.getSize();
baseListModel.removeRow(infoToAdd1);
count--;
assertEquals(count, listSearcher.getSize());
|
public void | testRemoveWithoutSearch()
assertEquals(baseListModel.getSize(), listSearcher.getSize());
baseListModel.addRow(infoToAdd1);
int count = listSearcher.getSize();
baseListModel.removeRow(infoToAdd1);
count--;
assertEquals(count, listSearcher.getSize());
|