@Test public void update_shouldClearExitingItems() throws Exception { recentActivities.update(new TestCallbacks()); apiGateway.simulateResponse(200, TestResponses.RECENT_ACTIVITY); assertThat(recentActivities.size(), equalTo(2)); recentActivities.update(new TestCallbacks()); apiGateway.simulateResponse(200, TestResponses.RECENT_ACTIVITY); assertThat(recentActivities.size(), equalTo(2)); }
public void update(Callbacks... callbacks) { MultiCallbacks multiCallbacks = new MultiCallbacks(callbacks); multiCallbacks.onStart(); apiGateway.makeRequest( new RecentActivityRequest(authenticationGateway.getToken()), new RecentActivityApiResponseCallbacks(multiCallbacks)); }
RecentActivities extends ArrayList<RecentActivity> { public void update(Callbacks... callbacks) { MultiCallbacks multiCallbacks = new MultiCallbacks(callbacks); multiCallbacks.onStart(); apiGateway.makeRequest( new RecentActivityRequest(authenticationGateway.getToken()), new RecentActivityApiResponseCallbacks(multiCallbacks)); } }
RecentActivities extends ArrayList<RecentActivity> { public void update(Callbacks... callbacks) { MultiCallbacks multiCallbacks = new MultiCallbacks(callbacks); multiCallbacks.onStart(); apiGateway.makeRequest( new RecentActivityRequest(authenticationGateway.getToken()), new RecentActivityApiResponseCallbacks(multiCallbacks)); } RecentActivities(ApiGateway apiGateway, AuthenticationGateway authenticationGateway); }
RecentActivities extends ArrayList<RecentActivity> { public void update(Callbacks... callbacks) { MultiCallbacks multiCallbacks = new MultiCallbacks(callbacks); multiCallbacks.onStart(); apiGateway.makeRequest( new RecentActivityRequest(authenticationGateway.getToken()), new RecentActivityApiResponseCallbacks(multiCallbacks)); } RecentActivities(ApiGateway apiGateway, AuthenticationGateway authenticationGateway); void update(Callbacks... callbacks); }
RecentActivities extends ArrayList<RecentActivity> { public void update(Callbacks... callbacks) { MultiCallbacks multiCallbacks = new MultiCallbacks(callbacks); multiCallbacks.onStart(); apiGateway.makeRequest( new RecentActivityRequest(authenticationGateway.getToken()), new RecentActivityApiResponseCallbacks(multiCallbacks)); } RecentActivities(ApiGateway apiGateway, AuthenticationGateway authenticationGateway); void update(Callbacks... callbacks);  }