Search in sources :

Example 1 with ContextMenuEvent

use of com.google.gwt.event.dom.client.ContextMenuEvent in project drools-wb by kiegroup.

the class BaseMenuViewImplTest method onContextMenuEvent.

@Test
public void onContextMenuEvent() {
    ContextMenuEvent mockEvent = mock(ContextMenuEvent.class);
    baseMenuView.onContextMenuEvent(mockEvent);
    verify(mockBaseMenu, times(1)).onContextMenuEvent(mockEvent);
}
Also used : ContextMenuEvent(com.google.gwt.event.dom.client.ContextMenuEvent) Test(org.junit.Test)

Example 2 with ContextMenuEvent

use of com.google.gwt.event.dom.client.ContextMenuEvent in project drools-wb by kiegroup.

the class BaseMenuTest method onContextMenuEvent.

@Test
public void onContextMenuEvent() {
    ContextMenuEvent mockEvent = mock(ContextMenuEvent.class);
    baseMenu.onContextMenuEvent(mockEvent);
    verify(mockEvent, times(1)).preventDefault();
    verify(mockEvent, times(1)).stopPropagation();
    verify(baseMenu, times(1)).hide();
}
Also used : ContextMenuEvent(com.google.gwt.event.dom.client.ContextMenuEvent) Test(org.junit.Test)

Aggregations

ContextMenuEvent (com.google.gwt.event.dom.client.ContextMenuEvent)2 Test (org.junit.Test)2