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());
}
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));
}
Aggregations