@Test public void testSetup() { generalSettingsPresenter.setup(model).catch_(i -> { Assert.fail("Promise should've been resolved!"); return promises.resolve(); }); verify(view).init(eq(generalSettingsPresenter)); verify(view).setName(any()); verify(view).setDescription(any()); verify(view).setGroupId(any()); verify(view).setArtifactId(any()); verify(view).setVersion(any()); verify(view).setGitUrlsView(any()); verify(gitUrlsPresenter).setup(any()); verify(gavPreferences).load(any(), any(), any()); }
@Override public Promise<Void> setup(final ProjectScreenModel model) { pom = model.getPOM(); view.init(this); view.setName(pom.getName()); view.setDescription(pom.getDescription()); view.setGroupId(pom.getGav().getGroupId()); view.setArtifactId(pom.getGav().getArtifactId()); view.setVersion(pom.getGav().getVersion()); gitUrlsPresenter.setup(model.getGitUrls()); view.setGitUrlsView(gitUrlsPresenter.getView()); return promises.create((resolve, reject) -> { gavPreferences.load(projectScopedResolutionStrategySupplier.get(), gavPreferences -> { view.setConflictingGAVCheckDisabled(gavPreferences.isConflictingGAVCheckDisabled()); view.setChildGavEditEnabled(gavPreferences.isChildGAVEditEnabled()); resolve.onInvoke(promises.resolve()); }, reject::onInvoke); }); }
GeneralSettingsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { pom = model.getPOM(); view.init(this); view.setName(pom.getName()); view.setDescription(pom.getDescription()); view.setGroupId(pom.getGav().getGroupId()); view.setArtifactId(pom.getGav().getArtifactId()); view.setVersion(pom.getGav().getVersion()); gitUrlsPresenter.setup(model.getGitUrls()); view.setGitUrlsView(gitUrlsPresenter.getView()); return promises.create((resolve, reject) -> { gavPreferences.load(projectScopedResolutionStrategySupplier.get(), gavPreferences -> { view.setConflictingGAVCheckDisabled(gavPreferences.isConflictingGAVCheckDisabled()); view.setChildGavEditEnabled(gavPreferences.isChildGAVEditEnabled()); resolve.onInvoke(promises.resolve()); }, reject::onInvoke); }); } }
GeneralSettingsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { pom = model.getPOM(); view.init(this); view.setName(pom.getName()); view.setDescription(pom.getDescription()); view.setGroupId(pom.getGav().getGroupId()); view.setArtifactId(pom.getGav().getArtifactId()); view.setVersion(pom.getGav().getVersion()); gitUrlsPresenter.setup(model.getGitUrls()); view.setGitUrlsView(gitUrlsPresenter.getView()); return promises.create((resolve, reject) -> { gavPreferences.load(projectScopedResolutionStrategySupplier.get(), gavPreferences -> { view.setConflictingGAVCheckDisabled(gavPreferences.isConflictingGAVCheckDisabled()); view.setChildGavEditEnabled(gavPreferences.isChildGAVEditEnabled()); resolve.onInvoke(promises.resolve()); }, reject::onInvoke); }); } @Inject  GeneralSettingsPresenter(final View view,
                                    final Promises promises,
                                    final MenuItem<ProjectScreenModel> menuItem,
                                    final Caller<ValidationService> validationService,
                                    final Caller<WorkspaceProjectService> projectService,
                                    final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                    final GAVPreferences gavPreferences,
                                    final ProjectScopedResolutionStrategySupplier projectScopedResolutionStrategySupplier,
                                    final GitUrlsPresenter gitUrlsPresenter,
                                    final LibraryPlaces libraryPlaces); }
GeneralSettingsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { pom = model.getPOM(); view.init(this); view.setName(pom.getName()); view.setDescription(pom.getDescription()); view.setGroupId(pom.getGav().getGroupId()); view.setArtifactId(pom.getGav().getArtifactId()); view.setVersion(pom.getGav().getVersion()); gitUrlsPresenter.setup(model.getGitUrls()); view.setGitUrlsView(gitUrlsPresenter.getView()); return promises.create((resolve, reject) -> { gavPreferences.load(projectScopedResolutionStrategySupplier.get(), gavPreferences -> { view.setConflictingGAVCheckDisabled(gavPreferences.isConflictingGAVCheckDisabled()); view.setChildGavEditEnabled(gavPreferences.isChildGAVEditEnabled()); resolve.onInvoke(promises.resolve()); }, reject::onInvoke); }); } @Inject  GeneralSettingsPresenter(final View view,
                                    final Promises promises,
                                    final MenuItem<ProjectScreenModel> menuItem,
                                    final Caller<ValidationService> validationService,
                                    final Caller<WorkspaceProjectService> projectService,
                                    final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                    final GAVPreferences gavPreferences,
                                    final ProjectScopedResolutionStrategySupplier projectScopedResolutionStrategySupplier,
                                    final GitUrlsPresenter gitUrlsPresenter,
                                    final LibraryPlaces libraryPlaces); @Override Promise<Void> setup(final ProjectScreenModel model); @Override Promise<Object> validate(); @Override Promise<Void> save(final String comment,
                              final Supplier<Promise<Void>> chain); @Override int currentHashCode(); GitUrlsPresenter getGitUrlsPresenter(); @Override SectionView<?> getView(); }
GeneralSettingsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { pom = model.getPOM(); view.init(this); view.setName(pom.getName()); view.setDescription(pom.getDescription()); view.setGroupId(pom.getGav().getGroupId()); view.setArtifactId(pom.getGav().getArtifactId()); view.setVersion(pom.getGav().getVersion()); gitUrlsPresenter.setup(model.getGitUrls()); view.setGitUrlsView(gitUrlsPresenter.getView()); return promises.create((resolve, reject) -> { gavPreferences.load(projectScopedResolutionStrategySupplier.get(), gavPreferences -> { view.setConflictingGAVCheckDisabled(gavPreferences.isConflictingGAVCheckDisabled()); view.setChildGavEditEnabled(gavPreferences.isChildGAVEditEnabled()); resolve.onInvoke(promises.resolve()); }, reject::onInvoke); }); } @Inject  GeneralSettingsPresenter(final View view,
                                    final Promises promises,
                                    final MenuItem<ProjectScreenModel> menuItem,
                                    final Caller<ValidationService> validationService,
                                    final Caller<WorkspaceProjectService> projectService,
                                    final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                    final GAVPreferences gavPreferences,
                                    final ProjectScopedResolutionStrategySupplier projectScopedResolutionStrategySupplier,
                                    final GitUrlsPresenter gitUrlsPresenter,
                                    final LibraryPlaces libraryPlaces); @Override Promise<Void> setup(final ProjectScreenModel model); @Override Promise<Object> validate(); @Override Promise<Void> save(final String comment,
                              final Supplier<Promise<Void>> chain); @Override int currentHashCode(); GitUrlsPresenter getGitUrlsPresenter(); @Override SectionView<?> getView();  }