Search in sources :

Example 1 with CanBeClosedByKeyboard

use of org.kie.workbench.common.dmn.client.editors.types.CanBeClosedByKeyboard in project kie-wb-common by kiegroup.

the class CellEditorControlsViewImplTest method testSetOnClosedByKeyboardCallback.

@Test
public void testSetOnClosedByKeyboardCallback() {
    final PopupEditorControls editor = mock(PopupEditorControls.class, withSettings().extraInterfaces(CanBeClosedByKeyboard.class));
    view.setOnClosedByKeyboardCallback(editor);
    verify((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(any());
}
Also used : PopupEditorControls(org.kie.workbench.common.dmn.client.widgets.grid.controls.PopupEditorControls) CanBeClosedByKeyboard(org.kie.workbench.common.dmn.client.editors.types.CanBeClosedByKeyboard) Test(org.junit.Test)

Example 2 with CanBeClosedByKeyboard

use of org.kie.workbench.common.dmn.client.editors.types.CanBeClosedByKeyboard in project kie-wb-common by kiegroup.

the class CellEditorControlsViewImplTest method testRemoveOnClosedByKeyboardCallback.

@Test
public void testRemoveOnClosedByKeyboardCallback() {
    final PopupEditorControls editor = mock(PopupEditorControls.class, withSettings().extraInterfaces(CanBeClosedByKeyboard.class));
    view.removeOnClosedByKeyboardCallback(editor);
    verify((CanBeClosedByKeyboard) editor).setOnClosedByKeyboardCallback(null);
}
Also used : PopupEditorControls(org.kie.workbench.common.dmn.client.widgets.grid.controls.PopupEditorControls) CanBeClosedByKeyboard(org.kie.workbench.common.dmn.client.editors.types.CanBeClosedByKeyboard) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)2 CanBeClosedByKeyboard (org.kie.workbench.common.dmn.client.editors.types.CanBeClosedByKeyboard)2 PopupEditorControls (org.kie.workbench.common.dmn.client.widgets.grid.controls.PopupEditorControls)2