Search in sources :

Example 6 with UberfireDocksInteractionEvent

use of org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent in project kie-wb-common by kiegroup.

the class AuthoringWorkbenchDocksTest method projectExplorerExpandedEvent_WithNullTargetDock.

@Test
public void projectExplorerExpandedEvent_WithNullTargetDock() {
    final UberfireDocksInteractionEvent uberfireDocksInteractionEvent = createUberfireDocksInteractionEvent(UberfireDockPosition.WEST, UberfireDocksInteractionEvent.InteractionType.RESIZED);
    authoringWorkbenchDocks.projectExplorerExpandedEvent(uberfireDocksInteractionEvent);
    verify(authoringWorkbenchDocks, never()).setProjectExplorerExpandedPreference(anyBoolean());
}
Also used : UberfireDocksInteractionEvent(org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent) Test(org.junit.Test)

Example 7 with UberfireDocksInteractionEvent

use of org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent in project drools-wb by kiegroup.

the class ScenarioSimulationEditorPresenterTest method isUberfireDocksInteractionEventToManage.

@Test
public void isUberfireDocksInteractionEventToManage() {
    UberfireDocksInteractionEvent uberfireDocksInteractionEventMock = mock(UberfireDocksInteractionEvent.class);
    doReturn(null).when(uberfireDocksInteractionEventMock).getTargetDock();
    assertFalse(presenterSpy.isUberfireDocksInteractionEventToManage(uberfireDocksInteractionEventMock));
    // 
    UberfireDock targetDockMock = mock(UberfireDock.class);
    when(uberfireDocksInteractionEventMock.getTargetDock()).thenReturn(targetDockMock);
    when(targetDockMock.getPlaceRequest()).thenReturn(placeRequestMock);
    when(placeRequestMock.getParameter(eq(SCESIMEDITOR_ID), eq(""))).thenReturn("UNKNOWN");
    assertFalse(presenterSpy.isUberfireDocksInteractionEventToManage(uberfireDocksInteractionEventMock));
    doReturn(String.valueOf(presenterSpy.scenarioPresenterId)).when(placeRequestMock).getParameter(eq(SCESIMEDITOR_ID), eq(""));
    assertTrue(presenterSpy.isUberfireDocksInteractionEventToManage(uberfireDocksInteractionEventMock));
}
Also used : UberfireDock(org.uberfire.client.workbench.docks.UberfireDock) UberfireDocksInteractionEvent(org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 UberfireDocksInteractionEvent (org.uberfire.client.workbench.docks.UberfireDocksInteractionEvent)7 UberfireDock (org.uberfire.client.workbench.docks.UberfireDock)3