use of org.ext.uberfire.social.activities.model.SocialFileSelectedEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method testOnSocialFileSelected_Repository.
@Test
public void testOnSocialFileSelected_Repository() {
doReturn(mock(WorkspaceProject.class)).when(projectService).resolveProject(any(Path.class));
doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
final SocialFileSelectedEvent event = new SocialFileSelectedEvent(ExtendedTypes.NEW_REPOSITORY_EVENT.name(), null);
libraryPlaces.onSocialFileSelected(event);
verify(placeManager).goTo(LibraryPlaces.REPOSITORY_STRUCTURE_SCREEN);
}
use of org.ext.uberfire.social.activities.model.SocialFileSelectedEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method testOnSocialFileSelected_Module.
@Test
public void testOnSocialFileSelected_Module() {
doReturn(mock(WorkspaceProject.class)).when(projectService).resolveProject(any(Path.class));
doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
final PlaceRequest libraryPerspective = libraryPlaces.getLibraryPlaceRequestWithoutRefresh();
final SocialFileSelectedEvent event = new SocialFileSelectedEvent(ModuleEventType.NEW_MODULE.name(), null);
libraryPlaces.onSocialFileSelected(event);
verify(placeManager).goTo(libraryPerspective);
verify(libraryPlaces).goToProject();
}
use of org.ext.uberfire.social.activities.model.SocialFileSelectedEvent in project kie-wb-common by kiegroup.
the class LibraryPlacesTest method testOnSocialFileSelected_Asset.
@Test
public void testOnSocialFileSelected_Asset() {
doReturn(mock(WorkspaceProject.class)).when(projectService).resolveProject(any(Path.class));
doReturn(PlaceStatus.OPEN).when(placeManager).getStatus(LibraryPlaces.LIBRARY_PERSPECTIVE);
final PlaceRequest libraryPerspective = libraryPlaces.getLibraryPlaceRequestWithoutRefresh();
final SocialFileSelectedEvent event = new SocialFileSelectedEvent("any", "uri");
libraryPlaces.onSocialFileSelected(event);
verify(placeManager).goTo(libraryPerspective);
verify(libraryPlaces).goToAsset(any(Path.class));
}
Aggregations