@Test public void testAcceptFailure() { editor.onAccept(); verify(view).getValue(); verify(view).clearErrors(); verify(translationService).getTranslation(StunnerBPMNConstants.ASSIGNEE_CANNOT_BE_EMPTY); verify(view).showError(anyString()); verify(customEntryCommand, never()).execute(any()); verify(okCommand, never()).execute(any()); }
@Override public void onAccept() { String value = view.getValue(); if (isValid(value)) { customEntryCommand.execute(value); okCommand.execute(new LiveSearchEntry<>(value, value)); } }
AssigneeLiveSearchEntryCreationEditor implements InlineCreationEditor<String>,
                                                              AssigneeLiveSearchEntryCreationEditorView.Presenter { @Override public void onAccept() { String value = view.getValue(); if (isValid(value)) { customEntryCommand.execute(value); okCommand.execute(new LiveSearchEntry<>(value, value)); } } }
AssigneeLiveSearchEntryCreationEditor implements InlineCreationEditor<String>,
                                                              AssigneeLiveSearchEntryCreationEditorView.Presenter { @Override public void onAccept() { String value = view.getValue(); if (isValid(value)) { customEntryCommand.execute(value); okCommand.execute(new LiveSearchEntry<>(value, value)); } } @Inject  AssigneeLiveSearchEntryCreationEditor(AssigneeLiveSearchEntryCreationEditorView view, TranslationService translationService); }
AssigneeLiveSearchEntryCreationEditor implements InlineCreationEditor<String>,
                                                              AssigneeLiveSearchEntryCreationEditorView.Presenter { @Override public void onAccept() { String value = view.getValue(); if (isValid(value)) { customEntryCommand.execute(value); okCommand.execute(new LiveSearchEntry<>(value, value)); } } @Inject  AssigneeLiveSearchEntryCreationEditor(AssigneeLiveSearchEntryCreationEditorView view, TranslationService translationService); void setCustomEntryCommand(ParameterizedCommand<String> customEntryCommand); @Override void init(ParameterizedCommand<LiveSearchEntry<String>> okCommand, Command cancelCommand); @Override void clear(); @Override void onAccept(); @Override void onCancel(); @Override HTMLElement getElement(); @Override String getFieldLabel(); }
AssigneeLiveSearchEntryCreationEditor implements InlineCreationEditor<String>,
                                                              AssigneeLiveSearchEntryCreationEditorView.Presenter { @Override public void onAccept() { String value = view.getValue(); if (isValid(value)) { customEntryCommand.execute(value); okCommand.execute(new LiveSearchEntry<>(value, value)); } } @Inject  AssigneeLiveSearchEntryCreationEditor(AssigneeLiveSearchEntryCreationEditorView view, TranslationService translationService); void setCustomEntryCommand(ParameterizedCommand<String> customEntryCommand); @Override void init(ParameterizedCommand<LiveSearchEntry<String>> okCommand, Command cancelCommand); @Override void clear(); @Override void onAccept(); @Override void onCancel(); @Override HTMLElement getElement(); @Override String getFieldLabel();  }