Search in sources :

Example 1 with PackageListPresenter

use of org.kie.workbench.common.screens.library.client.settings.sections.knowledgebases.item.KnowledgeBaseItemPresenter.PackageListPresenter 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.sections.knowledgebases.item.KnowledgeBaseItemPresenter.PackageListPresenter) KnowledgeBaseItemPresenter(org.kie.workbench.common.screens.library.client.settings.sections.knowledgebases.item.KnowledgeBaseItemPresenter) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 KnowledgeBaseItemPresenter (org.kie.workbench.common.screens.library.client.settings.sections.knowledgebases.item.KnowledgeBaseItemPresenter)1 PackageListPresenter (org.kie.workbench.common.screens.library.client.settings.sections.knowledgebases.item.KnowledgeBaseItemPresenter.PackageListPresenter)1