Search in sources :

Example 1 with ListSelector

use of org.kie.workbench.common.dmn.client.widgets.grid.controls.list.ListSelector in project kie-wb-common by kiegroup.

the class ContextMenuViewTest method setUp.

@Before
public void setUp() throws NoSuchFieldException, IllegalAccessException {
    presenter = mock(ContextMenu.class);
    listSelector = mock(ListSelector.class);
    final Field field = DomGlobal.class.getDeclaredField("document");
    field.setAccessible(true);
    Field modifiersField = Field.class.getDeclaredField("modifiers");
    modifiersField.setAccessible(true);
    modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL);
    field.set(DomGlobal.class, mock(HTMLDocument.class));
    contextMenuView = new ContextMenuView(listSelector);
    contextMenuView.init(presenter);
}
Also used : Field(java.lang.reflect.Field) HTMLDocument(elemental2.dom.HTMLDocument) ListSelector(org.kie.workbench.common.dmn.client.widgets.grid.controls.list.ListSelector) Before(org.junit.Before)

Aggregations

HTMLDocument (elemental2.dom.HTMLDocument)1 Field (java.lang.reflect.Field)1 Before (org.junit.Before)1 ListSelector (org.kie.workbench.common.dmn.client.widgets.grid.controls.list.ListSelector)1