@Test public void shouldNotCallCallbackOnAccepted() throws Exception { presenter = new MessageDialogPresenter(view, TITLE, MESSAGE, null); presenter.accepted(); verify(view).closeDialog(); verify(confirmCallback, never()).accepted(); }
@Override public void accepted() { this.view.closeDialog(); if (this.confirmCallback != null) { this.confirmCallback.accepted(); } }
MessageDialogPresenter implements MessageDialog, MessageDialogView.ActionDelegate { @Override public void accepted() { this.view.closeDialog(); if (this.confirmCallback != null) { this.confirmCallback.accepted(); } } }
MessageDialogPresenter implements MessageDialog, MessageDialogView.ActionDelegate { @Override public void accepted() { this.view.closeDialog(); if (this.confirmCallback != null) { this.confirmCallback.accepted(); } } @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted("title") String title,
                                  @Nonnull @Assisted("message") String message,
                                  @Nullable @Assisted ConfirmCallback confirmCallback); @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted String title,
                                  @Nonnull @Assisted IsWidget content,
                                  @Nullable @Assisted ConfirmCallback confirmCallback); @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted("title") String title,
                                  @Nonnull @Assisted IsWidget content,
                                  @Nullable @Assisted ConfirmCallback confirmCallback,
                                  @Nullable @Assisted("confirmButtonText") String confirmButtonText); }
MessageDialogPresenter implements MessageDialog, MessageDialogView.ActionDelegate { @Override public void accepted() { this.view.closeDialog(); if (this.confirmCallback != null) { this.confirmCallback.accepted(); } } @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted("title") String title,
                                  @Nonnull @Assisted("message") String message,
                                  @Nullable @Assisted ConfirmCallback confirmCallback); @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted String title,
                                  @Nonnull @Assisted IsWidget content,
                                  @Nullable @Assisted ConfirmCallback confirmCallback); @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted("title") String title,
                                  @Nonnull @Assisted IsWidget content,
                                  @Nullable @Assisted ConfirmCallback confirmCallback,
                                  @Nullable @Assisted("confirmButtonText") String confirmButtonText); @Override void accepted(); @Override void show(); }
MessageDialogPresenter implements MessageDialog, MessageDialogView.ActionDelegate { @Override public void accepted() { this.view.closeDialog(); if (this.confirmCallback != null) { this.confirmCallback.accepted(); } } @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted("title") String title,
                                  @Nonnull @Assisted("message") String message,
                                  @Nullable @Assisted ConfirmCallback confirmCallback); @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted String title,
                                  @Nonnull @Assisted IsWidget content,
                                  @Nullable @Assisted ConfirmCallback confirmCallback); @AssistedInject  MessageDialogPresenter(@Nonnull MessageDialogView view,
                                  @Nonnull @Assisted("title") String title,
                                  @Nonnull @Assisted IsWidget content,
                                  @Nullable @Assisted ConfirmCallback confirmCallback,
                                  @Nullable @Assisted("confirmButtonText") String confirmButtonText); @Override void accepted(); @Override void show();  }