@Test public void failure() throws Exception { final ArrayList<ValidationMessage> validationMessages = new ArrayList<>(); validationMessages.add(mock(ValidationMessage.class)); assetValidatedCallback.callback(validationMessages); Mockito.verify(notificationEvent, never()).fire(notificationEventArgumentCaptor.capture()); verify(validationPopup).showMessages(validationMessages); 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);  }