@Test public void should_show_empty_when_fetch_returns_nothing() { when(repository.fetchResponse(any())).thenReturn(Single.just(new ServiceResponse(null, Collections.emptyList()))); presenter.onStart(); verify(view).setViewState(ViewState.Empty.create(R.string.empty_message)); }
@Override public void onStart() { setLoading(); binder.bind(getAnimals(), this::setAnimals, this::setError, this::setComplete); }
Presenter implements Contract.Presenter { @Override public void onStart() { setLoading(); binder.bind(getAnimals(), this::setAnimals, this::setError, this::setComplete); } }
Presenter implements Contract.Presenter { @Override public void onStart() { setLoading(); binder.bind(getAnimals(), this::setAnimals, this::setError, this::setComplete); } Presenter(@NonNull Repository repository,
                   @NonNull Contract.View view,
                   @NonNull RxBinder binder,
                   @NonNull Logger logger); }
Presenter implements Contract.Presenter { @Override public void onStart() { setLoading(); binder.bind(getAnimals(), this::setAnimals, this::setError, this::setComplete); } Presenter(@NonNull Repository repository,
                   @NonNull Contract.View view,
                   @NonNull RxBinder binder,
                   @NonNull Logger logger); @Override void onStart(); @Override void onStop(); }
Presenter implements Contract.Presenter { @Override public void onStart() { setLoading(); binder.bind(getAnimals(), this::setAnimals, this::setError, this::setComplete); } Presenter(@NonNull Repository repository,
                   @NonNull Contract.View view,
                   @NonNull RxBinder binder,
                   @NonNull Logger logger); @Override void onStart(); @Override void onStop();  }