@Test public void testSetup() { final ModuleRepositories.ModuleRepository projectRepository = mock(ModuleRepositories.ModuleRepository.class); final ValidationPresenter parentPresenter = mock(ValidationPresenter.class); doReturn(new MavenRepositoryMetadata("test", "https: MavenRepositorySource.LOCAL)) .when(projectRepository).getMetadata(); validationItemPresenter.setup(projectRepository, parentPresenter); verify(view).init(eq(validationItemPresenter)); verify(view).setInclude(anyBoolean()); verify(view).setId(any()); verify(view).setUrl(any()); verify(view).setSource(any()); }
@Override public ValidationItemPresenter setup(final ModuleRepositories.ModuleRepository projectRepository, final ValidationPresenter parentPresenter) { this.projectRepository = projectRepository; this.parentPresenter = parentPresenter; view.init(this); view.setInclude(projectRepository.isIncluded()); view.setId(projectRepository.getMetadata().getId()); view.setUrl(projectRepository.getMetadata().getUrl()); view.setSource(projectRepository.getMetadata().getSource().name()); return this; }
ValidationItemPresenter extends ListItemPresenter<ModuleRepositories.ModuleRepository, ValidationPresenter, ValidationItemPresenter.View> { @Override public ValidationItemPresenter setup(final ModuleRepositories.ModuleRepository projectRepository, final ValidationPresenter parentPresenter) { this.projectRepository = projectRepository; this.parentPresenter = parentPresenter; view.init(this); view.setInclude(projectRepository.isIncluded()); view.setId(projectRepository.getMetadata().getId()); view.setUrl(projectRepository.getMetadata().getUrl()); view.setSource(projectRepository.getMetadata().getSource().name()); return this; } }
ValidationItemPresenter extends ListItemPresenter<ModuleRepositories.ModuleRepository, ValidationPresenter, ValidationItemPresenter.View> { @Override public ValidationItemPresenter setup(final ModuleRepositories.ModuleRepository projectRepository, final ValidationPresenter parentPresenter) { this.projectRepository = projectRepository; this.parentPresenter = parentPresenter; view.init(this); view.setInclude(projectRepository.isIncluded()); view.setId(projectRepository.getMetadata().getId()); view.setUrl(projectRepository.getMetadata().getUrl()); view.setSource(projectRepository.getMetadata().getSource().name()); return this; } @Inject  ValidationItemPresenter(final View view); }
ValidationItemPresenter extends ListItemPresenter<ModuleRepositories.ModuleRepository, ValidationPresenter, ValidationItemPresenter.View> { @Override public ValidationItemPresenter setup(final ModuleRepositories.ModuleRepository projectRepository, final ValidationPresenter parentPresenter) { this.projectRepository = projectRepository; this.parentPresenter = parentPresenter; view.init(this); view.setInclude(projectRepository.isIncluded()); view.setId(projectRepository.getMetadata().getId()); view.setUrl(projectRepository.getMetadata().getUrl()); view.setSource(projectRepository.getMetadata().getSource().name()); return this; } @Inject  ValidationItemPresenter(final View view); @Override ValidationItemPresenter setup(final ModuleRepositories.ModuleRepository projectRepository,
                                         final ValidationPresenter parentPresenter); void setInclude(final boolean include); @Override ModuleRepositories.ModuleRepository getObject(); }
ValidationItemPresenter extends ListItemPresenter<ModuleRepositories.ModuleRepository, ValidationPresenter, ValidationItemPresenter.View> { @Override public ValidationItemPresenter setup(final ModuleRepositories.ModuleRepository projectRepository, final ValidationPresenter parentPresenter) { this.projectRepository = projectRepository; this.parentPresenter = parentPresenter; view.init(this); view.setInclude(projectRepository.isIncluded()); view.setId(projectRepository.getMetadata().getId()); view.setUrl(projectRepository.getMetadata().getUrl()); view.setSource(projectRepository.getMetadata().getSource().name()); return this; } @Inject  ValidationItemPresenter(final View view); @Override ValidationItemPresenter setup(final ModuleRepositories.ModuleRepository projectRepository,
                                         final ValidationPresenter parentPresenter); void setInclude(final boolean include); @Override ModuleRepositories.ModuleRepository getObject();  }