예제 #1
0
 @Before
 public void setUp() throws Exception {
   mData = new FakeData<>();
   addAll(mData, "bear", "cat", "foo", "bar", "baz", "fish");
   mFilterData = new FilterData<>(mData, contains("b"));
   mFilterData.registerDataObserver(mFilterDataObserver);
   mFilterData.registerLoadingObserver(mFilterLoadingObserver);
   mFilterData.registerAvailableObserver(mFilterAvailableObserver);
   mFilterData.registerErrorObserver(mFilterErrorObserver);
 }
예제 #2
0
 @Test(expected = IndexOutOfBoundsException.class)
 public void invalidGetIndexThrowsIndexOutOfBounds() {
   mFilterData.get(5);
 }