Skip to content

CompositeDisposable spike

james spargo requested to merge 999_disposable_spike_for_pr into master

ok, I've got two different ways demonstrated in this PR. the first one (commit hash ea215248) is using DI, and therefore, makes the AircraftListPresenter easier to test. Still no clue on how to test it usage with the AircraftListFragment though.

The second commit is simply creating the CompositeDisposable inside the class, which kind of means the only way that stuff can be tested / verified, is through functional tests.

In each fragment, dispose is being called in onDestroy(). I'm curious if onDestroyView(), or onDetach() might be better places for them. I tried in onStop(), but that just made all the tests fail.

I look forward to hearing your thoughts.

Merge request reports