Search in sources :

Example 1 with PersistencePresenter

use of org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter in project kie-wb-common by kiegroup.

the class PropertiesItemPresenterTest method testRemove.

@Test
public void testRemove() {
    final PersistencePresenter parentPresenter = mock(PersistencePresenter.class);
    final PropertiesListPresenter listPresenter = mock(PropertiesListPresenter.class);
    propertiesItemPresenter.parentPresenter = parentPresenter;
    propertiesItemPresenter.setListPresenter(listPresenter);
    propertiesItemPresenter.remove();
    verify(listPresenter).remove(eq(propertiesItemPresenter));
    verify(parentPresenter).fireChangeEvent();
}
Also used : PropertiesListPresenter(org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter.PropertiesListPresenter) PersistencePresenter(org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter) Test(org.junit.Test)

Example 2 with PersistencePresenter

use of org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter in project kie-wb-common by kiegroup.

the class PersistableDataObjectsItemPresenterTest method testRemove.

@Test
public void testRemove() {
    final PersistencePresenter parentPresenter = mock(PersistencePresenter.class);
    final PersistableDataObjectsListPresenter listPresenter = mock(PersistableDataObjectsListPresenter.class);
    persistableDataObjectsItemPresenter.parentPresenter = parentPresenter;
    persistableDataObjectsItemPresenter.setListPresenter(listPresenter);
    persistableDataObjectsItemPresenter.remove();
    verify(listPresenter).remove(eq(persistableDataObjectsItemPresenter));
    verify(parentPresenter).fireChangeEvent();
}
Also used : PersistableDataObjectsListPresenter(org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter.PersistableDataObjectsListPresenter) PersistencePresenter(org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 PersistencePresenter (org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter)2 PersistableDataObjectsListPresenter (org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter.PersistableDataObjectsListPresenter)1 PropertiesListPresenter (org.kie.workbench.common.screens.library.client.settings.sections.persistence.PersistencePresenter.PropertiesListPresenter)1