Ejemplo n.º 1
0
 @Test
 public void testRemoveItemAsObservable() throws Exception {
   int deletedPosition = adapter.removeItemAsObservable(adapter.getItem(0)).toBlocking().single();
   assertThat(deletedPosition, is(0));
   assertThat(adapter.getItemCount(), is(2));
 }
Ejemplo n.º 2
0
 @Test
 public void testClearAsObservable() throws Exception {
   int deletedCount = adapter.clearAsObservable().toBlocking().value();
   assertThat(deletedCount, is(3));
   assertThat(adapter.getItemCount(), is(0));
 }
Ejemplo n.º 3
0
 @Test
 public void testGetItemCount() throws Exception {
   assertThat(adapter.getItemCount(), is(3));
 }