@Test public void onCopyValidationSucceededTest() { when(validationService.validateForCopy(any(Path.class), any(DataObject.class))).thenReturn(Collections.emptyList()); presenter.context = mock(DataModelerContext.class); presenter.onCopy(); verify(copyPopUpPresenter, times(1)).show(any(Path.class), any(JavaAssetUpdateValidator.class), any(CommandWithFileNameAndCommitMessage.class)); verify(validationPopup, never()).showCopyValidationMessages(any(Command.class), any(Command.class), anyListOf(ValidationMessage.class)); }
void onCopy() { validationService.call(checkMessages -> { if (((List<ValidationMessage>) checkMessages).isEmpty()) { showCopyPopup(); } else { validationPopup.showCopyValidationMessages(() -> showCopyPopup(), () -> { }, ((List<ValidationMessage>) checkMessages)); } }).validateForCopy(versionRecordManager.getPathToLatest(), context.getDataObject()); }
DataModelerScreenPresenter extends KieEditor<String> { void onCopy() { validationService.call(checkMessages -> { if (((List<ValidationMessage>) checkMessages).isEmpty()) { showCopyPopup(); } else { validationPopup.showCopyValidationMessages(() -> showCopyPopup(), () -> { }, ((List<ValidationMessage>) checkMessages)); } }).validateForCopy(versionRecordManager.getPathToLatest(), context.getDataObject()); } }
DataModelerScreenPresenter extends KieEditor<String> { void onCopy() { validationService.call(checkMessages -> { if (((List<ValidationMessage>) checkMessages).isEmpty()) { showCopyPopup(); } else { validationPopup.showCopyValidationMessages(() -> showCopyPopup(), () -> { }, ((List<ValidationMessage>) checkMessages)); } }).validateForCopy(versionRecordManager.getPathToLatest(), context.getDataObject()); } @Inject  DataModelerScreenPresenter(DataModelerScreenView baseView,
                                      SessionInfo sessionInfo); }
DataModelerScreenPresenter extends KieEditor<String> { void onCopy() { validationService.call(checkMessages -> { if (((List<ValidationMessage>) checkMessages).isEmpty()) { showCopyPopup(); } else { validationPopup.showCopyValidationMessages(() -> showCopyPopup(), () -> { }, ((List<ValidationMessage>) checkMessages)); } }).validateForCopy(versionRecordManager.getPathToLatest(), context.getDataObject()); } @Inject  DataModelerScreenPresenter(DataModelerScreenView baseView,
                                      SessionInfo sessionInfo); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartView IsWidget getView(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @OnFocus void onFocus(); @Override void showDocks(); @Override void hideDocks(); @OnMayClose boolean onMayClose(); @OnClose @Override void onClose(); void onSafeDelete(); void onSafeRename(); DataModel getDataModel(); String getSource(); void setSource(String source); @Override void onSourceTabSelected(); @Override void onOverviewSelected(); @Override void onEditTabSelected(); }
DataModelerScreenPresenter extends KieEditor<String> { void onCopy() { validationService.call(checkMessages -> { if (((List<ValidationMessage>) checkMessages).isEmpty()) { showCopyPopup(); } else { validationPopup.showCopyValidationMessages(() -> showCopyPopup(), () -> { }, ((List<ValidationMessage>) checkMessages)); } }).validateForCopy(versionRecordManager.getPathToLatest(), context.getDataObject()); } @Inject  DataModelerScreenPresenter(DataModelerScreenView baseView,
                                      SessionInfo sessionInfo); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartView IsWidget getView(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @OnFocus void onFocus(); @Override void showDocks(); @Override void hideDocks(); @OnMayClose boolean onMayClose(); @OnClose @Override void onClose(); void onSafeDelete(); void onSafeRename(); DataModel getDataModel(); String getSource(); void setSource(String source); @Override void onSourceTabSelected(); @Override void onOverviewSelected(); @Override void onEditTabSelected(); static final String EDITOR_ID; }