@Test public void testCurrentHashCode() { final ProjectScreenModel model = mock(ProjectScreenModel.class); final ModuleRepositories repositories = new ModuleRepositories(); doReturn(repositories).when(model).getRepositories(); validationPresenter.setup(model); int currentHashCode = validationPresenter.currentHashCode(); Assert.assertEquals(repositories.getRepositories().hashCode(), currentHashCode); repositories.getRepositories().add(mock(ModuleRepositories.ModuleRepository.class)); int updatedHashCode = validationPresenter.currentHashCode(); Assert.assertEquals(repositories.getRepositories().hashCode(), updatedHashCode); }
@Override public int currentHashCode() { return repositories.getRepositories().hashCode(); }
ValidationPresenter extends Section<ProjectScreenModel> { @Override public int currentHashCode() { return repositories.getRepositories().hashCode(); } }
ValidationPresenter extends Section<ProjectScreenModel> { @Override public int currentHashCode() { return repositories.getRepositories().hashCode(); } @Inject  ValidationPresenter(final ValidationPresenter.View view,
                               final Promises promises,
                               final MenuItem<ProjectScreenModel> menuItem,
                               final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                               final ValidationListPresenter validationItemPresenters); }
ValidationPresenter extends Section<ProjectScreenModel> { @Override public int currentHashCode() { return repositories.getRepositories().hashCode(); } @Inject  ValidationPresenter(final ValidationPresenter.View view,
                               final Promises promises,
                               final MenuItem<ProjectScreenModel> menuItem,
                               final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                               final ValidationListPresenter validationItemPresenters); @Override Promise<Void> setup(final ProjectScreenModel model); @Override int currentHashCode(); @Override SectionView<?> getView(); }
ValidationPresenter extends Section<ProjectScreenModel> { @Override public int currentHashCode() { return repositories.getRepositories().hashCode(); } @Inject  ValidationPresenter(final ValidationPresenter.View view,
                               final Promises promises,
                               final MenuItem<ProjectScreenModel> menuItem,
                               final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                               final ValidationListPresenter validationItemPresenters); @Override Promise<Void> setup(final ProjectScreenModel model); @Override int currentHashCode(); @Override SectionView<?> getView();  }