Search in sources :

Example 1 with KnowledgeSessionListItemPresenter

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

the class ListenerListItemPresenterTest method testRemove.

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

Aggregations

Test (org.junit.Test)1 KnowledgeSessionListItemPresenter (org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.knowledgesessions.KnowledgeSessionListItemPresenter)1 ListenersListPresenter (org.kie.workbench.common.screens.library.client.settings.knowledgebases.item.knowledgesessions.KnowledgeSessionListItemPresenter.ListenersListPresenter)1