use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectProjectSettingsTest.
@Test
public void onSelectProjectSettingsTest() {
doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
final DefaultPlaceRequest projectSettingsPlaceRequest = new DefaultPlaceRequest(LibraryPlaces.PROJECT_SETTINGS);
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
doReturn(projectSettingsPlaceRequest).when(placeGainFocusEvent).getPlace();
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(libraryPlaces).hideDocks();
verify(libraryPlaces).setupLibraryBreadCrumbsForAsset(null);
}
use of org.uberfire.client.workbench.events.PlaceGainFocusEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method onSelectPlaceOutsideLibraryTest.
@Test
public void onSelectPlaceOutsideLibraryTest() {
doReturn(PlaceStatus.CLOSE).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
doReturn(PlaceStatus.CLOSE).when(placeManager).getStatus(any(PlaceRequest.class));
final PlaceGainFocusEvent placeGainFocusEvent = mock(PlaceGainFocusEvent.class);
libraryPlaces.onSelectPlaceEvent(placeGainFocusEvent);
verify(placeGainFocusEvent, never()).getPlace();
}
Aggregations