@Test public void shouldNotCallCallbackOnCanceled() throws Exception { presenter = new InputDialogPresenter(view, TITLE, MESSAGE, inputCallback, null); presenter.cancelled(); verify(view).closeDialog(); verify(cancelCallback, never()).cancelled(); }
@Override public void cancelled() { this.view.closeDialog(); if (this.cancelCallback != null) { this.cancelCallback.cancelled(); } }
InputDialogPresenter implements InputDialog, InputDialogView.ActionDelegate { @Override public void cancelled() { this.view.closeDialog(); if (this.cancelCallback != null) { this.cancelCallback.cancelled(); } } }
InputDialogPresenter implements InputDialog, InputDialogView.ActionDelegate { @Override public void cancelled() { this.view.closeDialog(); if (this.cancelCallback != null) { this.cancelCallback.cancelled(); } } @AssistedInject  InputDialogPresenter(final @Nonnull InputDialogView view,
                                final @Nonnull @Assisted("title") String title,
                                final @Nonnull @Assisted("label") String label,
                                final @Nullable @Assisted InputCallback inputCallback,
                                final @Nullable @Assisted CancelCallback cancelCallback); @AssistedInject  InputDialogPresenter(final @Nonnull InputDialogView view,
                                final @Nonnull @Assisted("title") String title,
                                final @Nonnull @Assisted("label") String label,
                                final @Nonnull @Assisted("initialValue") String initialValue,
                                final @Nonnull @Assisted("selectionStartIndex") Integer selectionStartIndex,
                                final @Nonnull @Assisted("selectionLength") Integer selectionLength,
                                final @Nullable @Assisted InputCallback inputCallback,
                                final @Nullable @Assisted CancelCallback cancelCallback); }
InputDialogPresenter implements InputDialog, InputDialogView.ActionDelegate { @Override public void cancelled() { this.view.closeDialog(); if (this.cancelCallback != null) { this.cancelCallback.cancelled(); } } @AssistedInject  InputDialogPresenter(final @Nonnull InputDialogView view,
                                final @Nonnull @Assisted("title") String title,
                                final @Nonnull @Assisted("label") String label,
                                final @Nullable @Assisted InputCallback inputCallback,
                                final @Nullable @Assisted CancelCallback cancelCallback); @AssistedInject  InputDialogPresenter(final @Nonnull InputDialogView view,
                                final @Nonnull @Assisted("title") String title,
                                final @Nonnull @Assisted("label") String label,
                                final @Nonnull @Assisted("initialValue") String initialValue,
                                final @Nonnull @Assisted("selectionStartIndex") Integer selectionStartIndex,
                                final @Nonnull @Assisted("selectionLength") Integer selectionLength,
                                final @Nullable @Assisted InputCallback inputCallback,
                                final @Nullable @Assisted CancelCallback cancelCallback); @Override void cancelled(); @Override void accepted(); @Override void show(); @Override InputDialog withValidator(InputValidator inputValidator); }
InputDialogPresenter implements InputDialog, InputDialogView.ActionDelegate { @Override public void cancelled() { this.view.closeDialog(); if (this.cancelCallback != null) { this.cancelCallback.cancelled(); } } @AssistedInject  InputDialogPresenter(final @Nonnull InputDialogView view,
                                final @Nonnull @Assisted("title") String title,
                                final @Nonnull @Assisted("label") String label,
                                final @Nullable @Assisted InputCallback inputCallback,
                                final @Nullable @Assisted CancelCallback cancelCallback); @AssistedInject  InputDialogPresenter(final @Nonnull InputDialogView view,
                                final @Nonnull @Assisted("title") String title,
                                final @Nonnull @Assisted("label") String label,
                                final @Nonnull @Assisted("initialValue") String initialValue,
                                final @Nonnull @Assisted("selectionStartIndex") Integer selectionStartIndex,
                                final @Nonnull @Assisted("selectionLength") Integer selectionLength,
                                final @Nullable @Assisted InputCallback inputCallback,
                                final @Nullable @Assisted CancelCallback cancelCallback); @Override void cancelled(); @Override void accepted(); @Override void show(); @Override InputDialog withValidator(InputValidator inputValidator);  }