@Test public void bindTest() { when(datastoreGetActionsMock.user(post.getUserId())).thenReturn(user); postViewHolder.bind(post, onViewClickListenerMock); verify(datastoreGetActionsMock, times(1)).user(post.getUserId()); verifyNoMoreInteractions(datastoreGetActionsMock); assertThat(postViewHolder.itemView.hasOnClickListeners()).isTrue(); assertThat(postViewHolder.circleImageView.getDrawable()).isInstanceOf(BitmapDrawable.class); assertThat(postViewHolder.titleTextView.getText()).isEqualTo(post.getTitle()); }
void bind(final Post post, final OnViewClickListener onViewClickListener) { setOnPostClickListener(post, onViewClickListener); setViews(post); }
PostViewHolder extends RecyclerView.ViewHolder { void bind(final Post post, final OnViewClickListener onViewClickListener) { setOnPostClickListener(post, onViewClickListener); setViews(post); } }
PostViewHolder extends RecyclerView.ViewHolder { void bind(final Post post, final OnViewClickListener onViewClickListener) { setOnPostClickListener(post, onViewClickListener); setViews(post); } PostViewHolder(final View itemView); }
PostViewHolder extends RecyclerView.ViewHolder { void bind(final Post post, final OnViewClickListener onViewClickListener) { setOnPostClickListener(post, onViewClickListener); setViews(post); } PostViewHolder(final View itemView);  }
PostViewHolder extends RecyclerView.ViewHolder { void bind(final Post post, final OnViewClickListener onViewClickListener) { setOnPostClickListener(post, onViewClickListener); setViews(post); } PostViewHolder(final View itemView);   }