Search in sources :

Example 6 with SimpleItem

use of eu.davidea.samples.flexibleadapter.items.SimpleItem in project FlexibleAdapter by davideas.

the class FilterTest method verifyResult.

private void verifyResult() {
    int count = 0;
    for (AbstractFlexibleItem dbItem : mItems) {
        SimpleItem simpleItem = (SimpleItem) dbItem;
        if (simpleItem.filter("1")) {
            count++;
        }
    }
    assertEquals(count, mAdapter.getItemCount());
}
Also used : AbstractFlexibleItem(eu.davidea.flexibleadapter.items.AbstractFlexibleItem) SimpleItem(eu.davidea.samples.flexibleadapter.items.SimpleItem)

Aggregations

SimpleItem (eu.davidea.samples.flexibleadapter.items.SimpleItem)6 AbstractFlexibleItem (eu.davidea.flexibleadapter.items.AbstractFlexibleItem)3 IFlexible (eu.davidea.flexibleadapter.items.IFlexible)3 SubItem (eu.davidea.samples.flexibleadapter.items.SubItem)3 MenuItem (android.view.MenuItem)2 OverallItem (eu.davidea.samples.flexibleadapter.items.OverallItem)2 IExpandable (eu.davidea.flexibleadapter.items.IExpandable)1 ExpandableItem (eu.davidea.samples.flexibleadapter.items.ExpandableItem)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 Test (org.junit.Test)1