@Test public void whenOnDismissed_thenCallbackInformedOfEvent() { int dismissEvent = Callback.DISMISS_EVENT_MANUAL; callbackUnderTest.onDismissed(snackbar, dismissEvent); verify(callback).onDismissed(snackbar, dismissEvent); }
@Override public void onDismissed(Snackbar snackbar, @DismissEvent int event) { if (callback != null) { callback.onDismissed(snackbar, event); } }
SnackbarCallbackWrapper extends Callback { @Override public void onDismissed(Snackbar snackbar, @DismissEvent int event) { if (callback != null) { callback.onDismissed(snackbar, event); } } }
SnackbarCallbackWrapper extends Callback { @Override public void onDismissed(Snackbar snackbar, @DismissEvent int event) { if (callback != null) { callback.onDismissed(snackbar, event); } } SnackbarCallbackWrapper(Callback callback); }
SnackbarCallbackWrapper extends Callback { @Override public void onDismissed(Snackbar snackbar, @DismissEvent int event) { if (callback != null) { callback.onDismissed(snackbar, event); } } SnackbarCallbackWrapper(Callback callback); @Override void onDismissed(Snackbar snackbar, @DismissEvent int event); @Override void onShown(Snackbar snackbar); }
SnackbarCallbackWrapper extends Callback { @Override public void onDismissed(Snackbar snackbar, @DismissEvent int event) { if (callback != null) { callback.onDismissed(snackbar, event); } } SnackbarCallbackWrapper(Callback callback); @Override void onDismissed(Snackbar snackbar, @DismissEvent int event); @Override void onShown(Snackbar snackbar);  }