use of org.kie.workbench.common.stunner.client.widgets.presenters.session.SessionPresenter in project kie-wb-common by kiegroup.
the class AbstractProjectDiagramEditorTest method testCloseEditor.
@Test
@SuppressWarnings("unchecked")
public void testCloseEditor() {
SessionPresenter sessionPresenter = mock(SessionPresenter.class);
presenter.setSessionPresenter(sessionPresenter);
presenter.doClose();
verify(clearStatesSessionCommand, times(1)).unbind();
verify(switchGridSessionCommand, times(1)).unbind();
verify(visitGraphSessionCommand, times(1)).unbind();
verify(clearSessionCommand, times(1)).unbind();
verify(deleteSelectionSessionCommand, times(1)).unbind();
verify(undoSessionCommand, times(1)).unbind();
verify(redoSessionCommand, times(1)).unbind();
verify(validateSessionCommand, times(1)).unbind();
verify(exportToPngSessionCommand, times(1)).unbind();
verify(exportToJpgSessionCommand, times(1)).unbind();
verify(exportToPdfSessionCommand, times(1)).unbind();
verify(copySelectionSessionCommand, times(1)).unbind();
verify(pasteSelectionSessionCommand, times(1)).unbind();
verify(cutSelectionSessionCommand, times(1)).unbind();
verify(sessionPresenter, never()).clear();
verify(sessionPresenter, times(1)).destroy();
}
Aggregations