@Service @Scope(value="prototype") public class DataUser extends TestData<DataUser>
| Modifier and Type | Class and Description |
|---|---|
class |
DataUser.ListUserWithRoles
Handle list of user with particular roles
|
currentUser, EMAIL, PASSWORD, tasProperties| Constructor and Description |
|---|
DataUser() |
| Modifier and Type | Method and Description |
|---|---|
DataUser.ListUserWithRoles |
addUsersWithRolesToSite(SiteModel siteModel,
UserRole... roles) |
void |
addUserToSite(UserModel userModel,
SiteModel siteModel,
UserRole role) |
void |
assertTrashCanDoesNotHaveContent(ContentModel... contents)
Verify that content does not exist in trash can
|
void |
assertTrashCanHasContent(ContentModel... contents)
Verify if content exists in trash can
|
void |
assertUserDoesNotExist(UserModel user) |
void |
assertUserExist(String username) |
void |
assertUserExist(UserModel user) |
void |
assertUserIsAuthorized(UserModel userToVerify)
Verify if user is authorized
|
void |
assertUserIsNotAuthorized(UserModel userToVerify)
Verify if user is not authorized
|
UserModel |
createRandomTestUser()
Creates a new random user.
|
UserModel |
createRandomTestUser(String prefix)
Creates a new random user using a prefix for user name.
|
UserModel |
createUser(String userName)
Creates a new user with a specific user name on test server defined in
TasProperties
file. |
UserModel |
createUser(String userName,
String password)
Creates a new random user with a specific user name on test server defined in
TasProperties
file. |
UserModel |
createUser(UserModel user)
Create a new user based on the
UserModel provided |
UserModel |
createUserWithCustomEmailAddressInAlfresco(String userName,
String password,
String domain)
Creates a new random user with a specific username, password and e-mail address on the test server defined in
TasProperties |
UserModel |
createUserWithTenant(String userName)
Creates a new random user with a specific user name on test server defined in
TasProperties
file. |
void |
deleteUser(UserModel userToDelete)
Delete user
|
void |
disableUser(UserModel userToDisable)
Disable user
|
boolean |
isUserInRepo(String username)
Check if user exist in repository
|
org.apache.commons.httpclient.HttpState |
login(UserModel testUser)
Just authenticate using
|
void |
logout()
User logout
|
void |
removeUserFromSite(UserModel userModel,
SiteModel siteModel) |
void |
setUserQuota(UserModel userToModify,
int quota)
Set user quota in MB
|
assertExtensionAmpExists, assertLogLineIs, getAdminUser, getAlfrescoHome, getCurrentSite, getCurrentSpace, getCurrentUser, getDataDictionaryPath, getLastResource, getRootPath, getSitesPath, getUserHomesPath, isAFile, setCurrentSite, setCurrentSpace, setCurrentUser, setLastResource, usingAdmin, usingLastServerLogLines, usingResource, usingRoot, usingSite, usingSite, usingUser, usingUserHome, usingUserHome, withJMXpublic UserModel createUser(String userName) throws DataPreparationException
TasProperties
file.
If no user is specified with TestData.usingUser(UserModel) then the random user is created with admin.
This user will have default password set to "password"userName - DataPreparationExceptionpublic UserModel createUser(UserModel user) throws DataPreparationException
UserModel provideduser - UserModelDataPreparationExceptionpublic UserModel createUser(String userName, String password) throws DataPreparationException
TasProperties
file.
If no user is specified with TestData.usingUser(UserModel) then the random user is created with adminuserName - DataPreparationExceptionpublic UserModel createUserWithCustomEmailAddressInAlfresco(String userName, String password, String domain) throws DataPreparationException
TasPropertiesDataPreparationExceptionpublic UserModel createUserWithTenant(String userName) throws DataPreparationException
TasProperties
file.
The user is created with user specified with TestData.usingUser(UserModel)userName - DataPreparationExceptionpublic UserModel createRandomTestUser() throws DataPreparationException
TestData.usingUser(UserModel) then the random user is created with adminDataPreparationExceptionpublic UserModel createRandomTestUser(String prefix) throws DataPreparationException
TestData.usingUser(UserModel) then the random user is created with adminDataPreparationExceptionpublic DataUser.ListUserWithRoles addUsersWithRolesToSite(SiteModel siteModel, UserRole... roles) throws DataPreparationException
DataPreparationExceptionpublic void assertUserExist(UserModel user)
public void assertUserExist(String username)
public void assertUserDoesNotExist(UserModel user)
public boolean isUserInRepo(String username)
username - public void deleteUser(UserModel userToDelete) throws DataPreparationException
userToDelete - UserModel user deleteDataPreparationExceptionpublic void disableUser(UserModel userToDisable) throws DataPreparationException
userToDisable - DataPreparationExceptionpublic void assertTrashCanHasContent(ContentModel... contents)
content - ContentModel content to verifypublic void assertTrashCanDoesNotHaveContent(ContentModel... contents)
content - ContentModel content to verifypublic void setUserQuota(UserModel userToModify, int quota) throws DataPreparationException
userToModify - quota - DataPreparationExceptionpublic void assertUserIsAuthorized(UserModel userToVerify)
userToVerify - UserModelpublic void assertUserIsNotAuthorized(UserModel userToVerify)
userToVerify - UserModelpublic org.apache.commons.httpclient.HttpState login(UserModel testUser)
public void logout()
Copyright © 2005–2019 Alfresco Software. All rights reserved.