use of com.beloo.chipslayoutmanager.sample.ui.FewChipsFacade in project ChipsLayoutManager by BelooS.
the class FewChipsRowTest method setUp.
@Before
public void setUp() throws Throwable {
MockitoAnnotations.initMocks(this);
activity = activityTestRule.getActivity();
RecyclerView rvTest = (RecyclerView) activityTestRule.getActivity().findViewById(R.id.rvTest);
//disable all animations
rvTest.setItemAnimator(null);
layoutManager = getLayoutManager();
doReturn(layoutManager).when(layoutManagerFactory).layoutManager(any());
IItemsFacade<ChipsEntity> chipsFacade = spy(new FewChipsFacade());
items = chipsFacade.getItems();
when(chipsFacade.getItems()).thenReturn(items);
TestActivity.setItemsFactory(chipsFacade);
TestActivity.setLmFactory(layoutManagerFactory);
}
Aggregations