@Test public void testForceSave() { WorkspaceProject project = mock(WorkspaceProject.class); doReturn(project).when(projectScreenService).save(any(), any(), any(), any()); presenter.concurrentPomUpdateInfo = mock(ObservablePath.OnConcurrentUpdateEvent.class); presenter.forceSave("Test comment", null); assertEquals(null, presenter.concurrentPomUpdateInfo); verify(conflictingRepositoriesPopup).hide(); verify(presenter).saveProjectScreenModel(eq("Test comment"), eq(DeploymentMode.FORCED), any()); }
void forceSave(final String comment, final Supplier<Promise<Void>> chain) { concurrentPomUpdateInfo = null; conflictingRepositoriesPopup.hide(); saveProjectScreenModel(comment, DeploymentMode.FORCED, chain).then(i -> chain.get()); }
SettingsPresenter { void forceSave(final String comment, final Supplier<Promise<Void>> chain) { concurrentPomUpdateInfo = null; conflictingRepositoriesPopup.hide(); saveProjectScreenModel(comment, DeploymentMode.FORCED, chain).then(i -> chain.get()); } }
SettingsPresenter { void forceSave(final String comment, final Supplier<Promise<Void>> chain) { concurrentPomUpdateInfo = null; conflictingRepositoriesPopup.hide(); saveProjectScreenModel(comment, DeploymentMode.FORCED, chain).then(i -> chain.get()); } @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 forceSave(final String comment, final Supplier<Promise<Void>> chain) { concurrentPomUpdateInfo = null; conflictingRepositoriesPopup.hide(); saveProjectScreenModel(comment, DeploymentMode.FORCED, chain).then(i -> chain.get()); } @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 forceSave(final String comment, final Supplier<Promise<Void>> chain) { concurrentPomUpdateInfo = null; conflictingRepositoriesPopup.hide(); saveProjectScreenModel(comment, DeploymentMode.FORCED, chain).then(i -> chain.get()); } @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();  }