use of com.beloo.chipslayoutmanager.sample.ui.adapter.ChipsAdapter in project ChipsLayoutManager by BelooS.
the class ColumnTest method setAdapterTwice_ChipsLayoutManagerHaveSetToRecyclerView_NoException.
@Test
public void setAdapterTwice_ChipsLayoutManagerHaveSetToRecyclerView_NoException() throws Exception {
//arrange
ChipsFacade chipsFacade = spy(new ChipsFacade());
ChipsAdapter chipsAdapter = new ChipsAdapter(chipsFacade.getItems(), null);
//act
recyclerView.perform(setAdapter(chipsAdapter));
recyclerView.perform(setAdapter(chipsAdapter));
InstrumentalUtil.waitForIdle();
//assert
int pos = layoutManager.findFirstVisibleItemPosition();
assertNotEquals(RecyclerView.NO_POSITION, pos);
}
use of com.beloo.chipslayoutmanager.sample.ui.adapter.ChipsAdapter in project ChipsLayoutManager by BelooS.
the class RowTest method setAdapterTwice_ChipsLayoutManagerHaveSetToRecyclerView_NoException.
@Test
public void setAdapterTwice_ChipsLayoutManagerHaveSetToRecyclerView_NoException() throws Exception {
//arrange
ChipsFacade chipsFacade = spy(new ChipsFacade());
ChipsAdapter chipsAdapter = new ChipsAdapter(chipsFacade.getItems(), null);
//act
recyclerView.perform(setAdapter(chipsAdapter));
recyclerView.perform(setAdapter(chipsAdapter));
InstrumentalUtil.waitForIdle();
//assert
int pos = layoutManager.findFirstVisibleItemPosition();
assertNotEquals(RecyclerView.NO_POSITION, pos);
}
Aggregations