@Test public void onOkPreserveButton() { ((PreserveDeletePopupView)popupView).okPreserveCommand = null; ((PreserveDeletePopupView)popupView).onOkPreserveButton(mouseEventMock); verify(okPreserveCommandMock, never()).execute(); verify(popupView, times(1)).hide(); reset(popupView); ((PreserveDeletePopupView)popupView).okPreserveCommand = okPreserveCommandMock; ((PreserveDeletePopupView)popupView).onOkPreserveButton(mouseEventMock); verify(okPreserveCommandMock, times(1)).execute(); verify(popupView, times(1)).hide(); }
@EventHandler("ok-preserve-button") public void onOkPreserveButton(final @ForEvent("click") MouseEvent event) { if (okPreserveCommand != null) { okPreserveCommand.execute(); } hide(); }
PreserveDeletePopupView extends AbstractScenarioConfirmationPopupView implements PreserveDeletePopup { @EventHandler("ok-preserve-button") public void onOkPreserveButton(final @ForEvent("click") MouseEvent event) { if (okPreserveCommand != null) { okPreserveCommand.execute(); } hide(); } }
PreserveDeletePopupView extends AbstractScenarioConfirmationPopupView implements PreserveDeletePopup { @EventHandler("ok-preserve-button") public void onOkPreserveButton(final @ForEvent("click") MouseEvent event) { if (okPreserveCommand != null) { okPreserveCommand.execute(); } hide(); }  }
PreserveDeletePopupView extends AbstractScenarioConfirmationPopupView implements PreserveDeletePopup { @EventHandler("ok-preserve-button") public void onOkPreserveButton(final @ForEvent("click") MouseEvent event) { if (okPreserveCommand != null) { okPreserveCommand.execute(); } hide(); }  @Override void show(final String mainTitleText,
                     final String mainQuestionText,
                     final String text1Text,
                     final String textQuestionText,
                     final String option1Text,
                     final String option2Text,
                     final String okPreserveButtonText,
                     final String okDeleteButtonText,
                     final Command okPreserveCommand,
                     final Command okDeleteCommand); @EventHandler("ok-preserve-button") void onOkPreserveButton(final @ForEvent("click") MouseEvent event); }
PreserveDeletePopupView extends AbstractScenarioConfirmationPopupView implements PreserveDeletePopup { @EventHandler("ok-preserve-button") public void onOkPreserveButton(final @ForEvent("click") MouseEvent event) { if (okPreserveCommand != null) { okPreserveCommand.execute(); } hide(); }  @Override void show(final String mainTitleText,
                     final String mainQuestionText,
                     final String text1Text,
                     final String textQuestionText,
                     final String option1Text,
                     final String option2Text,
                     final String okPreserveButtonText,
                     final String okDeleteButtonText,
                     final Command okPreserveCommand,
                     final Command okDeleteCommand); @EventHandler("ok-preserve-button") void onOkPreserveButton(final @ForEvent("click") MouseEvent event);  }