@Test public void onComplete_shouldCallThroughToAllProvidedCallbacks() throws Exception { multiCallbacks.onComplete(); assertThat(testCallbacks0.completeWasCalled, equalTo(true)); assertThat(testCallbacks1.completeWasCalled, equalTo(true)); }
@Override public void onComplete() { for (Callbacks callback : callbacks) { callback.onComplete(); } }
MultiCallbacks extends Callbacks { @Override public void onComplete() { for (Callbacks callback : callbacks) { callback.onComplete(); } } }
MultiCallbacks extends Callbacks { @Override public void onComplete() { for (Callbacks callback : callbacks) { callback.onComplete(); } } MultiCallbacks(Callbacks... callbacks); }
MultiCallbacks extends Callbacks { @Override public void onComplete() { for (Callbacks callback : callbacks) { callback.onComplete(); } } MultiCallbacks(Callbacks... callbacks); @Override void onStart(); @Override void onSuccess(); @Override void onFailure(); @Override void onComplete(); }
MultiCallbacks extends Callbacks { @Override public void onComplete() { for (Callbacks callback : callbacks) { callback.onComplete(); } } MultiCallbacks(Callbacks... callbacks); @Override void onStart(); @Override void onSuccess(); @Override void onFailure(); @Override void onComplete();  }