@Test public void testAddNewIncludedKnowledgeBase() { KnowledgeBasesPresenter parentPresenter = mock(KnowledgeBasesPresenter.class); knowledgeBaseItemPresenter.setup(new KBaseModel(), parentPresenter); knowledgeBaseItemPresenter.addNewIncludedKnowledgeBase(); verify(includedKnowledgeBasesListPresenter).add(any()); verify(parentPresenter).fireChangeEvent(); }
public void addNewIncludedKnowledgeBase() { includedKnowledgeBasesListPresenter.add(new SingleValueItemObjectModel("")); parentPresenter.fireChangeEvent();; }
KnowledgeBaseItemPresenter extends ListItemPresenter<KBaseModel, KnowledgeBasesPresenter, KnowledgeBaseItemPresenter.View> { public void addNewIncludedKnowledgeBase() { includedKnowledgeBasesListPresenter.add(new SingleValueItemObjectModel("")); parentPresenter.fireChangeEvent();; } }
KnowledgeBaseItemPresenter extends ListItemPresenter<KBaseModel, KnowledgeBasesPresenter, KnowledgeBaseItemPresenter.View> { public void addNewIncludedKnowledgeBase() { includedKnowledgeBasesListPresenter.add(new SingleValueItemObjectModel("")); parentPresenter.fireChangeEvent();; } @Inject  KnowledgeBaseItemPresenter(final View view,
                                      final Event<DefaultKnowledgeBaseChange> defaultKnowledgeBaseChangeEvent,
                                      final KnowledgeSessionsModal knowledgeSessionsModal,
                                      final IncludedKnowledgeBasesListPresenter includedKnowledgeBasesListPresenter,
                                      final PackageListPresenter packageListPresenter); }
KnowledgeBaseItemPresenter extends ListItemPresenter<KBaseModel, KnowledgeBasesPresenter, KnowledgeBaseItemPresenter.View> { public void addNewIncludedKnowledgeBase() { includedKnowledgeBasesListPresenter.add(new SingleValueItemObjectModel("")); parentPresenter.fireChangeEvent();; } @Inject  KnowledgeBaseItemPresenter(final View view,
                                      final Event<DefaultKnowledgeBaseChange> defaultKnowledgeBaseChangeEvent,
                                      final KnowledgeSessionsModal knowledgeSessionsModal,
                                      final IncludedKnowledgeBasesListPresenter includedKnowledgeBasesListPresenter,
                                      final PackageListPresenter packageListPresenter); @Override KnowledgeBaseItemPresenter setup(final KBaseModel kBaseModel,
                                            final KnowledgeBasesPresenter parentPresenter); @Override void remove(); void onNameChange(final String name); void fireChangeEvent(); @Override KBaseModel getObject(); void addNewIncludedKnowledgeBase(); void addPackage(); void showKnowledgeSessionsModal(); void signalAddedOrRemoved(); void setDefault(final boolean isDefault); void onDefaultKnowledgeSessionChanged(@Observes final DefaultKnowledgeBaseChange event); }
KnowledgeBaseItemPresenter extends ListItemPresenter<KBaseModel, KnowledgeBasesPresenter, KnowledgeBaseItemPresenter.View> { public void addNewIncludedKnowledgeBase() { includedKnowledgeBasesListPresenter.add(new SingleValueItemObjectModel("")); parentPresenter.fireChangeEvent();; } @Inject  KnowledgeBaseItemPresenter(final View view,
                                      final Event<DefaultKnowledgeBaseChange> defaultKnowledgeBaseChangeEvent,
                                      final KnowledgeSessionsModal knowledgeSessionsModal,
                                      final IncludedKnowledgeBasesListPresenter includedKnowledgeBasesListPresenter,
                                      final PackageListPresenter packageListPresenter); @Override KnowledgeBaseItemPresenter setup(final KBaseModel kBaseModel,
                                            final KnowledgeBasesPresenter parentPresenter); @Override void remove(); void onNameChange(final String name); void fireChangeEvent(); @Override KBaseModel getObject(); void addNewIncludedKnowledgeBase(); void addPackage(); void showKnowledgeSessionsModal(); void signalAddedOrRemoved(); void setDefault(final boolean isDefault); void onDefaultKnowledgeSessionChanged(@Observes final DefaultKnowledgeBaseChange event);  }