@Test public void update_shouldMakeRequest() throws Exception { recentActivities.update(new TestCallbacks()); ApiRequest expectedRequest = new RecentActivityRequest("c93f12c"); assertThat(apiGateway.getLatestRequest(), equalTo(expectedRequest)); }
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);  }