From 968e5dd5b01abc532b131662d2b2f16cac9d1dca Mon Sep 17 00:00:00 2001 From: Boubaker Khanfir Date: Tue, 15 Oct 2024 08:48:42 +0100 Subject: [PATCH] feat: Adapt Mocked SpaceService API in Test context - MEED-7590 - Meeds-io/meeds#2476 (#352) This change will add some adaptations on SpaceService API Mocked in Unit Test Context. --- .../perkstore/test/mock/SpaceServiceMock.java | 507 ------------------ 1 file changed, 507 deletions(-) diff --git a/perk-store-services/src/test/java/org/exoplatform/perkstore/test/mock/SpaceServiceMock.java b/perk-store-services/src/test/java/org/exoplatform/perkstore/test/mock/SpaceServiceMock.java index 2cd9c1c7f..ce100a5bc 100644 --- a/perk-store-services/src/test/java/org/exoplatform/perkstore/test/mock/SpaceServiceMock.java +++ b/perk-store-services/src/test/java/org/exoplatform/perkstore/test/mock/SpaceServiceMock.java @@ -34,10 +34,6 @@ @SuppressWarnings("all") public class SpaceServiceMock implements SpaceService { - public Space getSpaceByDisplayName(String spaceDisplayName) { - throw new UnsupportedOperationException(); - } - public Space getSpaceByPrettyName(String spacePrettyName) { Space space = new Space(); space.setPrettyName(spacePrettyName); @@ -46,521 +42,18 @@ public Space getSpaceByPrettyName(String spacePrettyName) { return space; } - public Space getSpaceByGroupId(String groupId) { - throw new UnsupportedOperationException(); - } - public Space getSpaceById(String spaceId) { return null; } - public Space getSpaceByUrl(String spaceUrl) { - throw new UnsupportedOperationException(); - } - - public ListAccess getAllSpacesWithListAccess() { - throw new UnsupportedOperationException(); - } - - public ListAccess getAllSpacesByFilter(SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - } - - public ListAccess getMemberSpaces(String userId) { - throw new UnsupportedOperationException(); - } - - public ListAccess getMemberSpacesByFilter(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - } - - public ListAccess getAccessibleSpacesWithListAccess(String userId) { - throw new UnsupportedOperationException(); - } - - public ListAccess getAccessibleSpacesByFilter(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - } - - public ListAccess getSettingableSpaces(String userId) { - throw new UnsupportedOperationException(); - } - - public ListAccess getSettingabledSpacesByFilter(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - } - - public ListAccess getInvitedSpacesWithListAccess(String userId) { - throw new UnsupportedOperationException(); - } - - public ListAccess getInvitedSpacesByFilter(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - } - - public ListAccess getPublicSpacesWithListAccess(String userId) { - throw new UnsupportedOperationException(); - } - - public ListAccess getPublicSpacesByFilter(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - } - - public ListAccess getPendingSpacesWithListAccess(String userId) { - throw new UnsupportedOperationException(); - } - - public ListAccess getPendingSpacesByFilter(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - } - - public Space createSpace(Space space, String creatorUserId) { - throw new UnsupportedOperationException(); - } - - @Override - public Space createSpace(Space space, String creatorUserId, List identitiesToInvite) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public Space updateSpace(Space existingSpace) { - throw new UnsupportedOperationException(); - } - - public Space updateSpaceAvatar(Space existingSpace, String username) { - throw new UnsupportedOperationException(); - } - - public Space updateSpaceBanner(Space existingSpace, String username) { - throw new UnsupportedOperationException(); - } - - public void deleteSpace(Space space) { - throw new UnsupportedOperationException(); - } - - public void addPendingUser(Space space, String userId) { - throw new UnsupportedOperationException(); - } - - public void removePendingUser(Space space, String userId) { - throw new UnsupportedOperationException(); - } - - public boolean isPendingUser(Space space, String userId) { - throw new UnsupportedOperationException(); - } - - public void addInvitedUser(Space space, String userId) { - throw new UnsupportedOperationException(); - } - - public void removeInvitedUser(Space space, String userId) { - throw new UnsupportedOperationException(); - } - - public boolean isInvitedUser(Space space, String userId) { - throw new UnsupportedOperationException(); - - } - - public void addMember(Space space, String userId) { - throw new UnsupportedOperationException(); - - } - - public void removeMember(Space space, String userId) { - throw new UnsupportedOperationException(); - - } - public boolean isMember(Space space, String userId) { return false; } - public void setManager(Space space, String userId, boolean isManager) { - throw new UnsupportedOperationException(); - - } - public boolean isManager(Space space, String userId) { return false; } - public boolean isOnlyManager(Space space, String userId) { - throw new UnsupportedOperationException(); - - } - - public boolean hasAccessPermission(Space space, String userId) { - throw new UnsupportedOperationException(); - - } - - public boolean hasSettingPermission(Space space, String userId) { - throw new UnsupportedOperationException(); - - } - - public void registerSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin) { - throw new UnsupportedOperationException(); - - } - - public void unregisterSpaceListenerPlugin(SpaceListenerPlugin spaceListenerPlugin) { - throw new UnsupportedOperationException(); - - } - - public void setSpaceApplicationConfigPlugin(SpaceApplicationConfigPlugin spaceApplicationConfigPlugin) { - throw new UnsupportedOperationException(); - - } - - public SpaceApplicationConfigPlugin getSpaceApplicationConfigPlugin() { - throw new UnsupportedOperationException(); - - } - - public List getAllSpaces() throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public Space getSpaceByName(String spaceName) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getSpacesByFirstCharacterOfName(String firstCharacterOfName) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getSpacesBySearchCondition(String condition) throws Exception { - throw new UnsupportedOperationException(); - - } - - public List getSpaces(String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getAccessibleSpaces(String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getVisibleSpaces(String userId, SpaceFilter spaceFilter) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public SpaceListAccess getVisibleSpacesWithListAccess(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - - } - - public SpaceListAccess getUnifiedSearchSpacesWithListAccess(String userId, SpaceFilter spaceFilter) { - throw new UnsupportedOperationException(); - - } - - public List getEditableSpaces(String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getInvitedSpaces(String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getPublicSpaces(String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getPendingSpaces(String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public Space createSpace(Space space, String creator, String invitedGroupId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void saveSpace(Space space, boolean isNew) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void renameSpace(Space space, String newDisplayName) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void renameSpace(Space space, String newDisplayName, String remoteId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void deleteSpace(String spaceId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void initApp(Space space) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void initApps(Space space) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void deInitApps(Space space) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void addMember(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void removeMember(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getMembers(Space space) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getMembers(String spaceId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void setLeader(Space space, String userId, boolean isLeader) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void setLeader(String spaceId, String userId, boolean isLeader) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public boolean isLeader(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public boolean isLeader(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public boolean isOnlyLeader(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public boolean isOnlyLeader(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public boolean isMember(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public boolean hasAccessPermission(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public boolean hasEditPermission(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public boolean hasEditPermission(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public boolean isInvited(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public boolean isInvited(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public boolean isPending(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public boolean isPending(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void installApplication(String spaceId, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void installApplication(Space space, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void activateApplication(Space space, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void activateApplication(String spaceId, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void deactivateApplication(Space space, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void deactivateApplication(String spaceId, String appId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void removeApplication(Space space, String appId, String appName) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void removeApplication(String spaceId, String appId, String appName) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void updateSpaceAccessed(String remoteId, Space space) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public List getLastAccessedSpace(String remoteId, String appId, int offset, int limit) throws SpaceException { - throw new UnsupportedOperationException(); - } - - public List getLastSpaces(int limit) { - throw new UnsupportedOperationException(); - } - - public ListAccess getLastAccessedSpace(String remoteId, String appId) { - throw new UnsupportedOperationException(); - } - - public void requestJoin(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void requestJoin(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void revokeRequestJoin(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void revokeRequestJoin(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void inviteMember(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void inviteMember(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void revokeInvitation(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void revokeInvitation(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void acceptInvitation(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void acceptInvitation(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void denyInvitation(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void denyInvitation(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void validateRequest(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void validateRequest(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void declineRequest(Space space, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void declineRequest(String spaceId, String userId) throws SpaceException { - throw new UnsupportedOperationException(); - - } - - public void registerSpaceLifeCycleListener(SpaceLifeCycleListener listener) { - throw new UnsupportedOperationException(); - - } - - public void unregisterSpaceLifeCycleListener(SpaceLifeCycleListener listener) { - throw new UnsupportedOperationException(); - - } - - public ListAccess getVisitedSpaces(String remoteId, String appId) { - throw new UnsupportedOperationException(); - } - public boolean isSuperManager(String userId) { return false; }