@Test public void deleteNoValidationErrors() { when(validationService.validateForDelete(any(Path.class))).thenReturn(Collections.emptyList()); presenter.onDelete(); verify(validationService, times(1)).validateForDelete(any(Path.class)); verify(deletePopUpPresenter, times(1)).show(eq(assetUpdateValidator), any(ParameterizedCommand.class)); }
protected void onDelete() { validationService.call((validationMessages) -> { if (((List<ValidationMessage>) validationMessages).isEmpty()) { showDeletePopup(getVersionRecordManager().getCurrentPath()); } else { validationPopup.showDeleteValidationMessages(() -> showDeletePopup(versionRecordManager.getCurrentPath()), () -> { }, (List<ValidationMessage>) validationMessages); } }).validateForDelete(versionRecordManager.getCurrentPath()); }
GlobalsEditorPresenter extends KieEditor<GlobalsModel> { protected void onDelete() { validationService.call((validationMessages) -> { if (((List<ValidationMessage>) validationMessages).isEmpty()) { showDeletePopup(getVersionRecordManager().getCurrentPath()); } else { validationPopup.showDeleteValidationMessages(() -> showDeletePopup(versionRecordManager.getCurrentPath()), () -> { }, (List<ValidationMessage>) validationMessages); } }).validateForDelete(versionRecordManager.getCurrentPath()); } }
GlobalsEditorPresenter extends KieEditor<GlobalsModel> { protected void onDelete() { validationService.call((validationMessages) -> { if (((List<ValidationMessage>) validationMessages).isEmpty()) { showDeletePopup(getVersionRecordManager().getCurrentPath()); } else { validationPopup.showDeleteValidationMessages(() -> showDeletePopup(versionRecordManager.getCurrentPath()), () -> { }, (List<ValidationMessage>) validationMessages); } }).validateForDelete(versionRecordManager.getCurrentPath()); } GlobalsEditorPresenter(); @Inject  GlobalsEditorPresenter(final GlobalsEditorView baseView); }
GlobalsEditorPresenter extends KieEditor<GlobalsModel> { protected void onDelete() { validationService.call((validationMessages) -> { if (((List<ValidationMessage>) validationMessages).isEmpty()) { showDeletePopup(getVersionRecordManager().getCurrentPath()); } else { validationPopup.showDeleteValidationMessages(() -> showDeletePopup(versionRecordManager.getCurrentPath()), () -> { }, (List<ValidationMessage>) validationMessages); } }).validateForDelete(versionRecordManager.getCurrentPath()); } GlobalsEditorPresenter(); @Inject  GlobalsEditorPresenter(final GlobalsEditorView baseView); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override void onSourceTabSelected(); @WorkbenchPartView IsWidget getWidget(); @OnClose @Override void onClose(); @OnMayClose boolean mayClose(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartTitle String getTitleText(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); }
GlobalsEditorPresenter extends KieEditor<GlobalsModel> { protected void onDelete() { validationService.call((validationMessages) -> { if (((List<ValidationMessage>) validationMessages).isEmpty()) { showDeletePopup(getVersionRecordManager().getCurrentPath()); } else { validationPopup.showDeleteValidationMessages(() -> showDeletePopup(versionRecordManager.getCurrentPath()), () -> { }, (List<ValidationMessage>) validationMessages); } }).validateForDelete(versionRecordManager.getCurrentPath()); } GlobalsEditorPresenter(); @Inject  GlobalsEditorPresenter(final GlobalsEditorView baseView); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override void onSourceTabSelected(); @WorkbenchPartView IsWidget getWidget(); @OnClose @Override void onClose(); @OnMayClose boolean mayClose(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartTitle String getTitleText(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); static final String EDITOR_ID; }