@Test public void testSetup() { final ProjectScreenModel model = mock(ProjectScreenModel.class); doReturn(new ProjectImports()).when(model).getProjectImports(); externalDataObjectsPresenter.setup(model).catch_(i -> { Assert.fail("Promise should've been resolved!"); return promises.resolve(); }); verify(view).init(eq(externalDataObjectsPresenter)); verify(itemPresenters).setup(any(), any(), any()); }
@Override public Promise<Void> setup(final ProjectScreenModel model) { imports = model.getProjectImports().getImports(); view.init(this); itemPresenters.setup(view.getImportsTable(), imports.getImports(), (import_, presenter) -> presenter.setup(import_, this)); return promises.resolve(); }
ExternalDataObjectsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { imports = model.getProjectImports().getImports(); view.init(this); itemPresenters.setup(view.getImportsTable(), imports.getImports(), (import_, presenter) -> presenter.setup(import_, this)); return promises.resolve(); } }
ExternalDataObjectsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { imports = model.getProjectImports().getImports(); view.init(this); itemPresenters.setup(view.getImportsTable(), imports.getImports(), (import_, presenter) -> presenter.setup(import_, this)); return promises.resolve(); } @Inject  ExternalDataObjectsPresenter(final View view,
                                        final Promises promises,
                                        final MenuItem<ProjectScreenModel> menuItem,
                                        final ImportsListPresenter itemPresenters,
                                        final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent); }
ExternalDataObjectsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { imports = model.getProjectImports().getImports(); view.init(this); itemPresenters.setup(view.getImportsTable(), imports.getImports(), (import_, presenter) -> presenter.setup(import_, this)); return promises.resolve(); } @Inject  ExternalDataObjectsPresenter(final View view,
                                        final Promises promises,
                                        final MenuItem<ProjectScreenModel> menuItem,
                                        final ImportsListPresenter itemPresenters,
                                        final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent); @Override Promise<Void> setup(final ProjectScreenModel model); void addNewExternalDataObjects(); @Override int currentHashCode(); @Override SectionView<?> getView(); }
ExternalDataObjectsPresenter extends Section<ProjectScreenModel> { @Override public Promise<Void> setup(final ProjectScreenModel model) { imports = model.getProjectImports().getImports(); view.init(this); itemPresenters.setup(view.getImportsTable(), imports.getImports(), (import_, presenter) -> presenter.setup(import_, this)); return promises.resolve(); } @Inject  ExternalDataObjectsPresenter(final View view,
                                        final Promises promises,
                                        final MenuItem<ProjectScreenModel> menuItem,
                                        final ImportsListPresenter itemPresenters,
                                        final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent); @Override Promise<Void> setup(final ProjectScreenModel model); void addNewExternalDataObjects(); @Override int currentHashCode(); @Override SectionView<?> getView();  }