@Test public void testIsEmptyIfTrue() { final ListAdapter mockAdapter = mock(ListAdapter.class); final AdapterWrapper wrapper = new AdapterWrapper(mockAdapter); when(mockAdapter.isEmpty()).thenReturn(true); assertThat(wrapper.isEmpty(), is(true)); verify(mockAdapter).isEmpty(); verifyNoMoreInteractions(mockAdapter); }
@Override public boolean isEmpty() { return adapter == null || adapter.isEmpty(); }
AdapterWrapper implements WrapperListAdapter { @Override public boolean isEmpty() { return adapter == null || adapter.isEmpty(); } }
AdapterWrapper implements WrapperListAdapter { @Override public boolean isEmpty() { return adapter == null || adapter.isEmpty(); } AdapterWrapper(@Nullable final ListAdapter adapter); }
AdapterWrapper implements WrapperListAdapter { @Override public boolean isEmpty() { return adapter == null || adapter.isEmpty(); } AdapterWrapper(@Nullable final ListAdapter adapter); @Override @Nullable ListAdapter getWrappedAdapter(); @Override void registerDataSetObserver(@NonNull final DataSetObserver observer); @Override void unregisterDataSetObserver(@NonNull final DataSetObserver observer); @Override boolean isEmpty(); @Override int getCount(); @Override @Nullable Object getItem(final int position); @Override boolean hasStableIds(); @Override long getItemId(final int position); @Override int getViewTypeCount(); @Override int getItemViewType(final int position); @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @Override boolean areAllItemsEnabled(); @Override boolean isEnabled(final int position); }
AdapterWrapper implements WrapperListAdapter { @Override public boolean isEmpty() { return adapter == null || adapter.isEmpty(); } AdapterWrapper(@Nullable final ListAdapter adapter); @Override @Nullable ListAdapter getWrappedAdapter(); @Override void registerDataSetObserver(@NonNull final DataSetObserver observer); @Override void unregisterDataSetObserver(@NonNull final DataSetObserver observer); @Override boolean isEmpty(); @Override int getCount(); @Override @Nullable Object getItem(final int position); @Override boolean hasStableIds(); @Override long getItemId(final int position); @Override int getViewTypeCount(); @Override int getItemViewType(final int position); @Override View getView(final int position, @Nullable final View convertView, @NonNull final ViewGroup parent); @Override boolean areAllItemsEnabled(); @Override boolean isEnabled(final int position);  }