use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class ProjectDiagramEditorTest method testOnPlaceGainFocusEvent.
@Test
public void testOnPlaceGainFocusEvent() {
PlaceGainFocusEvent event = new PlaceGainFocusEvent(placeRequest);
tested.showDiagramEditorDocks(event);
verify(onDiagramFocusEvent).fire(any(OnDiagramFocusEvent.class));
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class ProjectDiagramEditorTest method testNotValidOnPlaceGainFocusEvent.
@Test
public void testNotValidOnPlaceGainFocusEvent() {
PlaceRequest anotherRequest = mock(PlaceRequest.class);
when(anotherRequest.getIdentifier()).thenReturn("");
PlaceGainFocusEvent event = new PlaceGainFocusEvent(anotherRequest);
tested.showDiagramEditorDocks(event);
verify(onDiagramFocusEvent, never()).fire(any(OnDiagramFocusEvent.class));
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectAssetTest.
@Test
public void onSelectAssetTest() {
doReturn(libraryPerspective).when(perspectiveManager).getCurrentPerspective();
final ObservablePath path = mock(ObservablePath.class);
final PathPlaceRequest pathPlaceRequest = mock(PathPlaceRequest.class);
doReturn(path).when(pathPlaceRequest).getPath();
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
doReturn(pathPlaceRequest).when(placeGainFocusEvent).getPlace();
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(libraryBreadcrumbs).setupForAsset(libraryPlaces.getActiveWorkspace(), path);
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectProjectTest.
@Test
public void onSelectProjectTest() {
doReturn(libraryPerspective).when(perspectiveManager).getCurrentPerspective();
final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.PROJECT_SCREEN);
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(libraryBreadcrumbs).setupForProject(libraryPlaces.getActiveWorkspace());
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectLibraryTest.
@Test
public void onSelectLibraryTest() {
doReturn(libraryPerspective).when(perspectiveManager).getCurrentPerspective();
final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.LIBRARY_SCREEN);
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(libraryBreadcrumbs).setupForSpace(libraryPlaces.getActiveWorkspace().getOrganizationalUnit());
}
Aggregations