@Test public void testRemoveAll() { sut.add(new Word()); sut.add(new Word()); assertEquals(2, sut.getItemCount()); sut.removeAll(); assertEquals(0, sut.getItemCount()); }
@Test public void testRemoveWord() { Word word = new Word(); sut.add(new Word()); assertEquals(1, sut.getItemCount()); sut.remove(word); assertEquals(0, sut.getItemCount()); }
@Test public void testOnBindViewHolder() { Word word = TestHelper.createWord(); word.setFavorite(false); sut.add(word); TranslationModeUtils.init(mActivity); FavoritesWordsRecyclerAdapter.MainViewHolder mainViewHolder = sut.onCreateViewHolder(new RelativeLayout(mActivity), 0); sut.onBindViewHolder(mainViewHolder, 0); Assert.assertNotNull(mainViewHolder.mTranslationModeView); }
@Test public void testGetItemCount() { sut.add(new Word()); sut.add(new Word()); assertEquals(2, sut.getItemCount()); }
@Test public void testCreateViewHolder() { assertNotNull(sut.onCreateViewHolder(new RelativeLayout(mActivity), 0)); }