@Test public void testOnErrorEvent() { ErrorEvent event = mock(ErrorEvent.class); when(event.getClientRuntimeError()).thenReturn(null); when(event.getMessage()).thenReturn("errorMessage"); presenter.currentWorkflow = dataSetBasicAttributesWorkflow; presenter.onErrorEvent(event); verify(dataSetBasicAttributesWorkflow, times(0)).clear(); verify(dataSetBasicAttributesWorkflow, times(0)).clearButtons(); verify(dataSetBasicAttributesWorkflow, times(0)).showTestButton(); verify(dataSetBasicAttributesWorkflow, times(0)).showNextButton(); verify(dataSetBasicAttributesWorkflow, times(0)).showBackButton(); verify(dataSetBasicAttributesWorkflow, times(0)).edit(any(DataSetDef.class)); verify(errorPopupPresenter, times(1)).showMessage(anyString()); verify(view, times(0)).setWidget(any(IsWidget.class)); }
void onErrorEvent(@Observes ErrorEvent errorEvent) { checkNotNull("errorEvent", errorEvent); if (errorEvent.getClientRuntimeError() != null) { showError(errorEvent.getClientRuntimeError()); } else if (errorEvent.getMessage() != null) { showError(errorEvent.getMessage()); } }
DataSetDefWizardScreen { void onErrorEvent(@Observes ErrorEvent errorEvent) { checkNotNull("errorEvent", errorEvent); if (errorEvent.getClientRuntimeError() != null) { showError(errorEvent.getClientRuntimeError()); } else if (errorEvent.getMessage() != null) { showError(errorEvent.getMessage()); } } }
DataSetDefWizardScreen { void onErrorEvent(@Observes ErrorEvent errorEvent) { checkNotNull("errorEvent", errorEvent); if (errorEvent.getClientRuntimeError() != null) { showError(errorEvent.getClientRuntimeError()); } else if (errorEvent.getMessage() != null) { showError(errorEvent.getMessage()); } } @Inject  DataSetDefWizardScreen(final SyncBeanManager beanManager,
                                  final DataSetEditorWorkflowFactory workflowFactory,
                                  final Caller<DataSetDefVfsServices> services,
                                  final DataSetClientServices clientServices,
                                  final Event<NotificationEvent> notification,
                                  final PlaceManager placeManager,
                                  final ErrorPopupPresenter errorPopupPresenter,
                                  final SavePopUpPresenter savePopUpPresenter,
                                  final DataSetDefScreenView view); }
DataSetDefWizardScreen { void onErrorEvent(@Observes ErrorEvent errorEvent) { checkNotNull("errorEvent", errorEvent); if (errorEvent.getClientRuntimeError() != null) { showError(errorEvent.getClientRuntimeError()); } else if (errorEvent.getMessage() != null) { showError(errorEvent.getMessage()); } } @Inject  DataSetDefWizardScreen(final SyncBeanManager beanManager,
                                  final DataSetEditorWorkflowFactory workflowFactory,
                                  final Caller<DataSetDefVfsServices> services,
                                  final DataSetClientServices clientServices,
                                  final Event<NotificationEvent> notification,
                                  final PlaceManager placeManager,
                                  final ErrorPopupPresenter errorPopupPresenter,
                                  final SavePopUpPresenter savePopUpPresenter,
                                  final DataSetDefScreenView view); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsWidget getView(); @OnStartup void init(PlaceRequest placeRequest); @OnClose void onClose(); void completeEdition(final DataSetDef dataSetDef,
                                final DataSet dataset); }
DataSetDefWizardScreen { void onErrorEvent(@Observes ErrorEvent errorEvent) { checkNotNull("errorEvent", errorEvent); if (errorEvent.getClientRuntimeError() != null) { showError(errorEvent.getClientRuntimeError()); } else if (errorEvent.getMessage() != null) { showError(errorEvent.getMessage()); } } @Inject  DataSetDefWizardScreen(final SyncBeanManager beanManager,
                                  final DataSetEditorWorkflowFactory workflowFactory,
                                  final Caller<DataSetDefVfsServices> services,
                                  final DataSetClientServices clientServices,
                                  final Event<NotificationEvent> notification,
                                  final PlaceManager placeManager,
                                  final ErrorPopupPresenter errorPopupPresenter,
                                  final SavePopUpPresenter savePopUpPresenter,
                                  final DataSetDefScreenView view); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsWidget getView(); @OnStartup void init(PlaceRequest placeRequest); @OnClose void onClose(); void completeEdition(final DataSetDef dataSetDef,
                                final DataSet dataset); public DataSetDefScreenView view; }