@Test public void onBindViewHolderTest() { postRecyclerViewAdapter.onBindViewHolder(holderMock, POSITION); verify(holderMock, times(1)).bind(posts.get(POSITION), onViewClickListenerMock); verifyNoMoreInteractions(holderMock); }
@Override public void onBindViewHolder(final PostViewHolder holder, final int position) { holder.bind(getItem(position), onViewClickListener); }
PostRecyclerViewAdapter extends RecyclerView.Adapter<PostViewHolder> implements RecyclerViewAdapter { @Override public void onBindViewHolder(final PostViewHolder holder, final int position) { holder.bind(getItem(position), onViewClickListener); } }
PostRecyclerViewAdapter extends RecyclerView.Adapter<PostViewHolder> implements RecyclerViewAdapter { @Override public void onBindViewHolder(final PostViewHolder holder, final int position) { holder.bind(getItem(position), onViewClickListener); } PostRecyclerViewAdapter(final OnViewClickListener onViewClickListener); }
PostRecyclerViewAdapter extends RecyclerView.Adapter<PostViewHolder> implements RecyclerViewAdapter { @Override public void onBindViewHolder(final PostViewHolder holder, final int position) { holder.bind(getItem(position), onViewClickListener); } PostRecyclerViewAdapter(final OnViewClickListener onViewClickListener); @Override PostViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType); @Override void onBindViewHolder(final PostViewHolder holder, final int position); @Override int getItemCount(); @Override void reloadAdapter(final List<Post> posts); @Override Post getItem(int position); }
PostRecyclerViewAdapter extends RecyclerView.Adapter<PostViewHolder> implements RecyclerViewAdapter { @Override public void onBindViewHolder(final PostViewHolder holder, final int position) { holder.bind(getItem(position), onViewClickListener); } PostRecyclerViewAdapter(final OnViewClickListener onViewClickListener); @Override PostViewHolder onCreateViewHolder(final ViewGroup parent, final int viewType); @Override void onBindViewHolder(final PostViewHolder holder, final int position); @Override int getItemCount(); @Override void reloadAdapter(final List<Post> posts); @Override Post getItem(int position);  }