@Test public void saveTest() { presenter.setup("myBranch"); presenter.save("comment", null); verify(libraryService).saveBranchPermissions(eq("mySpace"), eq("myProject"), eq("myBranch"), any()); }
@Override public Promise<Void> save(final String comment, final Supplier<Promise<Void>> chain) { return promises.all(branchPermissionsByBranch.entrySet().stream().map(entry -> promises.promisify(libraryService, service -> { service.saveBranchPermissions(libraryPlaces.getActiveSpace().getName(), libraryPlaces.getActiveWorkspace().getRepository().getIdentifier(), entry.getKey(), entry.getValue()); })).toArray(Promise[]::new)); }
BranchManagementPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> save(final String comment, final Supplier<Promise<Void>> chain) { return promises.all(branchPermissionsByBranch.entrySet().stream().map(entry -> promises.promisify(libraryService, service -> { service.saveBranchPermissions(libraryPlaces.getActiveSpace().getName(), libraryPlaces.getActiveWorkspace().getRepository().getIdentifier(), entry.getKey(), entry.getValue()); })).toArray(Promise[]::new)); } }
BranchManagementPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> save(final String comment, final Supplier<Promise<Void>> chain) { return promises.all(branchPermissionsByBranch.entrySet().stream().map(entry -> promises.promisify(libraryService, service -> { service.saveBranchPermissions(libraryPlaces.getActiveSpace().getName(), libraryPlaces.getActiveWorkspace().getRepository().getIdentifier(), entry.getKey(), entry.getValue()); })).toArray(Promise[]::new)); } @Inject  BranchManagementPresenter(final View view,
                                     final Promises promises,
                                     final MenuItem<ProjectScreenModel> menuItem,
                                     final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                     final Caller<LibraryService> libraryService,
                                     final LibraryPlaces libraryPlaces,
                                     final RoleAccessListPresenter roleAccessListPresenter,
                                     final ProjectController projectController); }
BranchManagementPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> save(final String comment, final Supplier<Promise<Void>> chain) { return promises.all(branchPermissionsByBranch.entrySet().stream().map(entry -> promises.promisify(libraryService, service -> { service.saveBranchPermissions(libraryPlaces.getActiveSpace().getName(), libraryPlaces.getActiveWorkspace().getRepository().getIdentifier(), entry.getKey(), entry.getValue()); })).toArray(Promise[]::new)); } @Inject  BranchManagementPresenter(final View view,
                                     final Promises promises,
                                     final MenuItem<ProjectScreenModel> menuItem,
                                     final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                     final Caller<LibraryService> libraryService,
                                     final LibraryPlaces libraryPlaces,
                                     final RoleAccessListPresenter roleAccessListPresenter,
                                     final ProjectController projectController); @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(); @Override SectionView<?> getView(); }
BranchManagementPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> save(final String comment, final Supplier<Promise<Void>> chain) { return promises.all(branchPermissionsByBranch.entrySet().stream().map(entry -> promises.promisify(libraryService, service -> { service.saveBranchPermissions(libraryPlaces.getActiveSpace().getName(), libraryPlaces.getActiveWorkspace().getRepository().getIdentifier(), entry.getKey(), entry.getValue()); })).toArray(Promise[]::new)); } @Inject  BranchManagementPresenter(final View view,
                                     final Promises promises,
                                     final MenuItem<ProjectScreenModel> menuItem,
                                     final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                     final Caller<LibraryService> libraryService,
                                     final LibraryPlaces libraryPlaces,
                                     final RoleAccessListPresenter roleAccessListPresenter,
                                     final ProjectController projectController); @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(); @Override SectionView<?> getView();  }