@Test public void success() throws Exception { assetValidatedCallback.callback(new ArrayList<>()); Mockito.verify(notificationEvent).fire(notificationEventArgumentCaptor.capture()); assertEquals("ItemValidatedSuccessfully", notificationEventArgumentCaptor.getValue().getNotification()); assertEquals(NotificationEvent.NotificationType.SUCCESS, notificationEventArgumentCaptor.getValue().getType()); verify(validationPopup, never()).showMessages(anyList()); verify(validationFinishedCommand).execute(); }
@Override public void callback(final List<ValidationMessage> validationMessages) { if (validationMessages == null || validationMessages.isEmpty()) { notifyValidationSuccess(); } else { validationPopup.showMessages(validationMessages); } if (validationFinishedCommand != null) { validationFinishedCommand.execute(); } }
AssetValidatedCallback implements RemoteCallback<List<ValidationMessage>> { @Override public void callback(final List<ValidationMessage> validationMessages) { if (validationMessages == null || validationMessages.isEmpty()) { notifyValidationSuccess(); } else { validationPopup.showMessages(validationMessages); } if (validationFinishedCommand != null) { validationFinishedCommand.execute(); } } }
AssetValidatedCallback implements RemoteCallback<List<ValidationMessage>> { @Override public void callback(final List<ValidationMessage> validationMessages) { if (validationMessages == null || validationMessages.isEmpty()) { notifyValidationSuccess(); } else { validationPopup.showMessages(validationMessages); } if (validationFinishedCommand != null) { validationFinishedCommand.execute(); } } AssetValidatedCallback(final Command validationFinishedCommand,
                                  final Event<NotificationEvent> notificationEvent,
                                  final ValidationPopup validationPopup); }
AssetValidatedCallback implements RemoteCallback<List<ValidationMessage>> { @Override public void callback(final List<ValidationMessage> validationMessages) { if (validationMessages == null || validationMessages.isEmpty()) { notifyValidationSuccess(); } else { validationPopup.showMessages(validationMessages); } if (validationFinishedCommand != null) { validationFinishedCommand.execute(); } } AssetValidatedCallback(final Command validationFinishedCommand,
                                  final Event<NotificationEvent> notificationEvent,
                                  final ValidationPopup validationPopup); @Override void callback(final List<ValidationMessage> validationMessages); }
AssetValidatedCallback implements RemoteCallback<List<ValidationMessage>> { @Override public void callback(final List<ValidationMessage> validationMessages) { if (validationMessages == null || validationMessages.isEmpty()) { notifyValidationSuccess(); } else { validationPopup.showMessages(validationMessages); } if (validationFinishedCommand != null) { validationFinishedCommand.execute(); } } AssetValidatedCallback(final Command validationFinishedCommand,
                                  final Event<NotificationEvent> notificationEvent,
                                  final ValidationPopup validationPopup); @Override void callback(final List<ValidationMessage> validationMessages);  }