Search in sources :

Example 6 with CanvasSettings

use of org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings in project kie-wb-common by kiegroup.

the class LienzoCanvasTest method testDestroy.

@Test
public void testDestroy() {
    CanvasPanel panel = mock(CanvasPanel.class);
    CanvasSettings settings = mock(CanvasSettings.class);
    ViewEventHandlerManager eventHandler = mock(ViewEventHandlerManager.class);
    tested.initialize(panel, settings, eventHandler);
    tested.destroy();
    verify(eventHandler, times(1)).destroy();
    verify(view, times(1)).destroy();
}
Also used : CanvasPanel(org.kie.workbench.common.stunner.core.client.canvas.CanvasPanel) CanvasSettings(org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings) ViewEventHandlerManager(org.kie.workbench.common.stunner.client.lienzo.shape.view.ViewEventHandlerManager) Test(org.junit.Test)

Aggregations

CanvasSettings (org.kie.workbench.common.stunner.core.client.canvas.CanvasSettings)6 Test (org.junit.Test)4 CanvasPanel (org.kie.workbench.common.stunner.core.client.canvas.CanvasPanel)4 ViewEventHandlerManager (org.kie.workbench.common.stunner.client.lienzo.shape.view.ViewEventHandlerManager)2 StunnerDiagramEditorPreferences (org.kie.workbench.common.stunner.core.preferences.StunnerDiagramEditorPreferences)2 DragHandler (org.kie.workbench.common.stunner.core.client.shape.view.event.DragHandler)1