@Test public void testNewKSessionModelNonEmptyList() { doReturn(singletonList(mock(KSessionModel.class))).when(knowledgeBasesListPresenter).getObjectsList(); final KSessionModel kSessionModel = knowledgeSessionsModal.newKSessionModel(); Assert.assertEquals("", kSessionModel.getName()); Assert.assertEquals(false, kSessionModel.isDefault()); }
KSessionModel newKSessionModel() { final KSessionModel kSessionModel = new KSessionModel(); kSessionModel.setName(""); kSessionModel.setDefault(knowledgeBasesListPresenter.getObjectsList().isEmpty()); return kSessionModel; }
KnowledgeSessionsModal extends Elemental2Modal<KnowledgeSessionsModal.View> { KSessionModel newKSessionModel() { final KSessionModel kSessionModel = new KSessionModel(); kSessionModel.setName(""); kSessionModel.setDefault(knowledgeBasesListPresenter.getObjectsList().isEmpty()); return kSessionModel; } }
KnowledgeSessionsModal extends Elemental2Modal<KnowledgeSessionsModal.View> { KSessionModel newKSessionModel() { final KSessionModel kSessionModel = new KSessionModel(); kSessionModel.setName(""); kSessionModel.setDefault(knowledgeBasesListPresenter.getObjectsList().isEmpty()); return kSessionModel; } @Inject  KnowledgeSessionsModal(final View view,
                                  final KnowledgeBasesListPresenter knowledgeBasesListPresenter); }
KnowledgeSessionsModal extends Elemental2Modal<KnowledgeSessionsModal.View> { KSessionModel newKSessionModel() { final KSessionModel kSessionModel = new KSessionModel(); kSessionModel.setName(""); kSessionModel.setDefault(knowledgeBasesListPresenter.getObjectsList().isEmpty()); return kSessionModel; } @Inject  KnowledgeSessionsModal(final View view,
                                  final KnowledgeBasesListPresenter knowledgeBasesListPresenter); void setup(final KnowledgeBaseItemPresenter parentPresenter); @Override void setWidth(final String width); KBaseModel getObject(); void add(); void signalKnowledgeBaseAddedOrRemoved(); void fireChangeEvent(); void done(); }
KnowledgeSessionsModal extends Elemental2Modal<KnowledgeSessionsModal.View> { KSessionModel newKSessionModel() { final KSessionModel kSessionModel = new KSessionModel(); kSessionModel.setName(""); kSessionModel.setDefault(knowledgeBasesListPresenter.getObjectsList().isEmpty()); return kSessionModel; } @Inject  KnowledgeSessionsModal(final View view,
                                  final KnowledgeBasesListPresenter knowledgeBasesListPresenter); void setup(final KnowledgeBaseItemPresenter parentPresenter); @Override void setWidth(final String width); KBaseModel getObject(); void add(); void signalKnowledgeBaseAddedOrRemoved(); void fireChangeEvent(); void done();  }