@Test public void fetchData_successNoListeners_completesWithoutErrors() throws Exception { success(); SUT.fetchData(); mThreadPostersTestDouble.join(); assertThat(true, is(true)); }
public void fetchData() { mBackgroundThreadPoster.post(new Runnable() { @Override public void run() { fetchDataSync(); } }); }
FetchDataUseCase { public void fetchData() { mBackgroundThreadPoster.post(new Runnable() { @Override public void run() { fetchDataSync(); } }); } }
FetchDataUseCase { public void fetchData() { mBackgroundThreadPoster.post(new Runnable() { @Override public void run() { fetchDataSync(); } }); } FetchDataUseCase(FakeDataFetcher fakeDataFetcher,
                            BackgroundThreadPoster backgroundThreadPoster,
                            UiThreadPoster uiThreadPoster); }
FetchDataUseCase { public void fetchData() { mBackgroundThreadPoster.post(new Runnable() { @Override public void run() { fetchDataSync(); } }); } FetchDataUseCase(FakeDataFetcher fakeDataFetcher,
                            BackgroundThreadPoster backgroundThreadPoster,
                            UiThreadPoster uiThreadPoster); void registerListener(Listener listener); void unregisterListener(Listener listener); void fetchData(); }
FetchDataUseCase { public void fetchData() { mBackgroundThreadPoster.post(new Runnable() { @Override public void run() { fetchDataSync(); } }); } FetchDataUseCase(FakeDataFetcher fakeDataFetcher,
                            BackgroundThreadPoster backgroundThreadPoster,
                            UiThreadPoster uiThreadPoster); void registerListener(Listener listener); void unregisterListener(Listener listener); void fetchData();  }