@Test public void testAddAllToWhiteList() { dependenciesPresenter.model = mock(ProjectScreenModel.class); doReturn(new WhiteList()).when(dependenciesPresenter.model).getWhiteList(); assertEquals(0, dependenciesPresenter.model.getWhiteList().size()); dependenciesPresenter.addAllToWhiteList(new HashSet<>(Arrays.asList("foo", "bar"))); assertEquals(2, dependenciesPresenter.model.getWhiteList().size()); verify(enhancedDependenciesManager).update(); }
public void addAllToWhiteList(final Set<String> packages) { model.getWhiteList().addAll(packages); enhancedDependenciesManager.update(); }
DependenciesPresenter extends Section<ProjectScreenModel> { public void addAllToWhiteList(final Set<String> packages) { model.getWhiteList().addAll(packages); enhancedDependenciesManager.update(); } }
DependenciesPresenter extends Section<ProjectScreenModel> { public void addAllToWhiteList(final Set<String> packages) { model.getWhiteList().addAll(packages); enhancedDependenciesManager.update(); } @Inject  DependenciesPresenter(final View view,
                                 final Promises promises,
                                 final MenuItem<ProjectScreenModel> menuItem,
                                 final DependencySelectorPopup dependencySelectorPopup,
                                 final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                 final EnhancedDependenciesManager enhancedDependenciesManager,
                                 final ManagedInstance<DependenciesItemPresenter> presenters); }
DependenciesPresenter extends Section<ProjectScreenModel> { public void addAllToWhiteList(final Set<String> packages) { model.getWhiteList().addAll(packages); enhancedDependenciesManager.update(); } @Inject  DependenciesPresenter(final View view,
                                 final Promises promises,
                                 final MenuItem<ProjectScreenModel> menuItem,
                                 final DependencySelectorPopup dependencySelectorPopup,
                                 final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                 final EnhancedDependenciesManager enhancedDependenciesManager,
                                 final ManagedInstance<DependenciesItemPresenter> presenters); @Override Promise<Void> setup(final ProjectScreenModel model); @Override Promise<Object> validate(); void addNewDependency(); void addAllToWhiteList(final Set<String> packages); void removeAllFromWhiteList(final Set<String> packages); void addFromRepository(); void remove(final EnhancedDependency enhancedDependency); @Override int currentHashCode(); @Override SectionView<?> getView(); }
DependenciesPresenter extends Section<ProjectScreenModel> { public void addAllToWhiteList(final Set<String> packages) { model.getWhiteList().addAll(packages); enhancedDependenciesManager.update(); } @Inject  DependenciesPresenter(final View view,
                                 final Promises promises,
                                 final MenuItem<ProjectScreenModel> menuItem,
                                 final DependencySelectorPopup dependencySelectorPopup,
                                 final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                 final EnhancedDependenciesManager enhancedDependenciesManager,
                                 final ManagedInstance<DependenciesItemPresenter> presenters); @Override Promise<Void> setup(final ProjectScreenModel model); @Override Promise<Object> validate(); void addNewDependency(); void addAllToWhiteList(final Set<String> packages); void removeAllFromWhiteList(final Set<String> packages); void addFromRepository(); void remove(final EnhancedDependency enhancedDependency); @Override int currentHashCode(); @Override SectionView<?> getView();  }