com.silverpeas.profile.web
Class UserProfileTestResources
java.lang.Object
com.silverpeas.web.TestResources
com.silverpeas.profile.web.UserProfileTestResources
- All Implemented Interfaces:
- org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware
@Named(value="testRESTResources")
public class UserProfileTestResources
- extends TestResources
The resources to use in the test on the UserProfileResource REST service. Theses objects manage
in a single place all the resources required to perform correctly unit tests on the
UserProfileResource published operations.
| Methods inherited from class com.silverpeas.web.TestResources |
aUser, aUserNamed, getAccessControllerMock, getApplicationContext, getOrganizationControllerMock, getPersonalizationServiceMock, getSessionManagerMock, getSpaceAccessControllerMock, getTestResources, getTokenServiceMock, setApplicationContext |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAVA_PACKAGE
public static final String JAVA_PACKAGE
- See Also:
- Constant Field Values
SPRING_CONTEXT
public static final String SPRING_CONTEXT
- See Also:
- Constant Field Values
USER_PROFILE_PATH
public static final String USER_PROFILE_PATH
- See Also:
- Constant Field Values
GROUP_PROFILE_PATH
public static final String GROUP_PROFILE_PATH
- See Also:
- Constant Field Values
UserProfileTestResources
public UserProfileTestResources()
allocate
@PostConstruct
public void allocate()
- Allocates the resources required by the unit tests.
getAllExistingUsers
public UserDetail[] getAllExistingUsers()
whenSearchGroupsByCriteriaThenReturn
public void whenSearchGroupsByCriteriaThenReturn(Group[] groups)
whenSearchUsersByCriteriaThenReturn
public void whenSearchUsersByCriteriaThenReturn(UserDetailsSearchCriteria criteria,
UserDetail[] users)
getAllExistingUsersInDomain
public UserDetail[] getAllExistingUsersInDomain(String domainId)
getAllExistingRootGroups
public Group[] getAllExistingRootGroups()
getAllExistingRootGroupsInDomain
public Group[] getAllExistingRootGroupsInDomain(String domainId)
getAllRootGroupsAccessibleFromDomain
public Group[] getAllRootGroupsAccessibleFromDomain(String domainId)
getGroupById
public Group getGroupById(String groupId)
getAllDomainIds
public List<String> getAllDomainIds()
getAllDomainIdsExceptedSilverpeasOne
public List<String> getAllDomainIdsExceptedSilverpeasOne()
anExistingUser
public UserDetail anExistingUser()
- Gets randomly an existing user detail among the available resources for tests.
- Returns:
- a user detail.
anExistingUserNotInSilverpeasDomain
public UserDetail anExistingUserNotInSilverpeasDomain()
anExistingGroup
public Group anExistingGroup()
- Gets randomly an existing group among the available resources for tests.
- Returns:
- a group.
anExistingRootGroup
public Group anExistingRootGroup()
getAGroupNotInAnInternalDomain
public Group getAGroupNotInAnInternalDomain()
- Gets a group that isn't in an internal domain.
- Returns:
- a group in a domain other than internal one.
getRelationShipsOfUser
public UserDetail[] getRelationShipsOfUser(String userId)
registerUser
public UserDetail registerUser(UserDetail user)
- Overrides:
registerUser in class TestResources
getUserIds
public String[] getUserIds(UserDetail... users)
getGroupIds
public String[] getGroupIds(Group... groups)
Copyright © 2016 Silverpeas. All Rights Reserved.