Search in sources :

Example 1 with KnowledgeBaseItemPresenter

use of org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter in project kie-wb-common by kiegroup.

the class IncludedKnowledgeBaseItemPresenterTest method testRemove.

@Test
public void testRemove() {
    final KnowledgeBaseItemPresenter parentPresenter = mock(KnowledgeBaseItemPresenter.class);
    final IncludedKnowledgeBasesListPresenter listPresenter = mock(IncludedKnowledgeBasesListPresenter.class);
    includedKnowledgeBaseItemPresenter.parentPresenter = parentPresenter;
    includedKnowledgeBaseItemPresenter.setListPresenter(listPresenter);
    includedKnowledgeBaseItemPresenter.remove();
    verify(listPresenter).remove(eq(includedKnowledgeBaseItemPresenter));
    verify(parentPresenter).fireChangeEvent();
}
Also used : IncludedKnowledgeBasesListPresenter(org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter.IncludedKnowledgeBasesListPresenter) KnowledgeBaseItemPresenter(org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter) Test(org.junit.Test)

Example 2 with KnowledgeBaseItemPresenter

use of org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter in project kie-wb-common by kiegroup.

the class KnowledgeSessionsModalTest method testSetup.

@Test
public void testSetup() {
    final KnowledgeBaseItemPresenter parentPresenter = mock(KnowledgeBaseItemPresenter.class);
    doReturn(new KBaseModel()).when(parentPresenter).getObject();
    doNothing().when(knowledgeSessionsModal).superSetup();
    doNothing().when(knowledgeSessionsModal).setWidth(any());
    knowledgeSessionsModal.setup(parentPresenter);
    verify(knowledgeSessionsModal).superSetup();
    verify(knowledgeBasesListPresenter).setup(any(), any(), any());
}
Also used : KBaseModel(org.kie.workbench.common.services.shared.kmodule.KBaseModel) KnowledgeBaseItemPresenter(org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter) Test(org.junit.Test)

Example 3 with KnowledgeBaseItemPresenter

use of org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter in project kie-wb-common by kiegroup.

the class PackageItemPresenterTest method testRemove.

@Test
public void testRemove() {
    final KnowledgeBaseItemPresenter parentPresenter = mock(KnowledgeBaseItemPresenter.class);
    final PackageListPresenter listPresenter = mock(PackageListPresenter.class);
    packageItemPresenter.parentPresenter = parentPresenter;
    packageItemPresenter.setListPresenter(listPresenter);
    packageItemPresenter.remove();
    verify(listPresenter).remove(eq(packageItemPresenter));
    verify(parentPresenter).fireChangeEvent();
}
Also used : PackageListPresenter(org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter.PackageListPresenter) KnowledgeBaseItemPresenter(org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 KnowledgeBaseItemPresenter (org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter)3 IncludedKnowledgeBasesListPresenter (org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter.IncludedKnowledgeBasesListPresenter)1 PackageListPresenter (org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.KnowledgeBaseItemPresenter.PackageListPresenter)1 KBaseModel (org.kie.workbench.common.services.shared.kmodule.KBaseModel)1