@Test public void testHandlePomConcurrentUpdate() { presenter.model = mock(ProjectScreenModel.class); doReturn(mock(POM.class)).when(presenter.model).getPOM(); presenter.handlePomConcurrentUpdate("Test comment", null, new GAVAlreadyExistsException()).then(i -> { fail("Promise should've not been resolved!"); return promises.resolve(); }); verify(view).hideBusyIndicator(); verify(conflictingRepositoriesPopup).setContent(any(), any(), any()); verify(conflictingRepositoriesPopup).show(); }
void handlePomConcurrentUpdate(final String comment, final Supplier<Promise<Void>> chain) { newConcurrentUpdate(concurrentPomUpdateInfo.getPath(), concurrentPomUpdateInfo.getIdentity(), () -> forceSave(comment, chain), () -> { }, this::reset).show(); }
SettingsPresenter { void handlePomConcurrentUpdate(final String comment, final Supplier<Promise<Void>> chain) { newConcurrentUpdate(concurrentPomUpdateInfo.getPath(), concurrentPomUpdateInfo.getIdentity(), () -> forceSave(comment, chain), () -> { }, this::reset).show(); } }
SettingsPresenter { void handlePomConcurrentUpdate(final String comment, final Supplier<Promise<Void>> chain) { newConcurrentUpdate(concurrentPomUpdateInfo.getPath(), concurrentPomUpdateInfo.getIdentity(), () -> forceSave(comment, chain), () -> { }, this::reset).show(); } @Inject  SettingsPresenter(final View view,
                             final Promises promises,
                             final Event<NotificationEvent> notificationEvent,
                             final @Customizable SettingsSections<ProjectScreenModel> settingsSections,
                             final SavePopUpPresenter savePopUpPresenter,
                             final Caller<ProjectScreenService> projectScreenService,
                             final WorkspaceProjectContext projectContext,
                             final ManagedInstance<ObservablePath> observablePaths,
                             final ConflictingRepositoriesPopup conflictingRepositoriesPopup,
                             final SectionManager<ProjectScreenModel> sectionManager,
                             final ProjectController projectController); }
SettingsPresenter { void handlePomConcurrentUpdate(final String comment, final Supplier<Promise<Void>> chain) { newConcurrentUpdate(concurrentPomUpdateInfo.getPath(), concurrentPomUpdateInfo.getIdentity(), () -> forceSave(comment, chain), () -> { }, this::reset).show(); } @Inject  SettingsPresenter(final View view,
                             final Promises promises,
                             final Event<NotificationEvent> notificationEvent,
                             final @Customizable SettingsSections<ProjectScreenModel> settingsSections,
                             final SavePopUpPresenter savePopUpPresenter,
                             final Caller<ProjectScreenService> projectScreenService,
                             final WorkspaceProjectContext projectContext,
                             final ManagedInstance<ObservablePath> observablePaths,
                             final ConflictingRepositoriesPopup conflictingRepositoriesPopup,
                             final SectionManager<ProjectScreenModel> sectionManager,
                             final ProjectController projectController); @PostConstruct void setup(); Promise<Void> setupUsingCurrentSection(); void showSaveModal(); void onSettingsSectionChanged(@Observes final SettingsSectionChange<ProjectScreenModel> settingsSectionChange); boolean mayClose(); void reset(); View getView(); }
SettingsPresenter { void handlePomConcurrentUpdate(final String comment, final Supplier<Promise<Void>> chain) { newConcurrentUpdate(concurrentPomUpdateInfo.getPath(), concurrentPomUpdateInfo.getIdentity(), () -> forceSave(comment, chain), () -> { }, this::reset).show(); } @Inject  SettingsPresenter(final View view,
                             final Promises promises,
                             final Event<NotificationEvent> notificationEvent,
                             final @Customizable SettingsSections<ProjectScreenModel> settingsSections,
                             final SavePopUpPresenter savePopUpPresenter,
                             final Caller<ProjectScreenService> projectScreenService,
                             final WorkspaceProjectContext projectContext,
                             final ManagedInstance<ObservablePath> observablePaths,
                             final ConflictingRepositoriesPopup conflictingRepositoriesPopup,
                             final SectionManager<ProjectScreenModel> sectionManager,
                             final ProjectController projectController); @PostConstruct void setup(); Promise<Void> setupUsingCurrentSection(); void showSaveModal(); void onSettingsSectionChanged(@Observes final SettingsSectionChange<ProjectScreenModel> settingsSectionChange); boolean mayClose(); void reset(); View getView();  }