com.atlassian.jira.functest.framework.admin
Class UsersAndGroupsImpl

java.lang.Object
  extended by com.atlassian.jira.functest.framework.admin.UsersAndGroupsImpl
All Implemented Interfaces:
UsersAndGroups

public class UsersAndGroupsImpl
extends Object
implements UsersAndGroups

Admin operations for users and groups

Since:
v3.13

Constructor Summary
UsersAndGroupsImpl(net.sourceforge.jwebunit.WebTester tester, Navigation navigation, TextAssertions text, LocatorFactory locators)
           
 
Method Summary
 void addGroup(String groupName)
          Adds the specified group.
 void addUser(String username)
          Creates a user with the given username and the same password, fullname and an email address username@example.com
 void addUser(String username, String password, String fullname, String emailAddress)
          Adds a user with specified values.
 void addUser(String username, String password, String fullname, String emailAddress, boolean sendEmail)
          Adds a user with specified values.
 void addUserToGroup(String userName, String groupName)
          Adds the specified user to the specified group
 void addUserWithoutVerifyingResult(String username, String password, String fullname, String emailAddress)
          Attempts to add a user with specified values, but does not verify that the add succeeded.
 void addUserWithoutVerifyingResult(String username, String password, String fullname, String emailAddress, boolean sendEmail)
          Attempts to add a user with specified values, but does not verify that the add succeeded.
 void deleteGroup(String groupname)
          Removes a group given the groupname.
 void deleteUser(String username)
          Removes a user given the username.
 EditUserPage gotoEditUser(String username)
          Navigate to the edit user page in the admin section for the given user.
 void gotoUserBrowser()
          Navigate to the user browser page.
 void gotoViewUser(String username)
          Navigate to the view user page in the admin section for the given user.
 void removeUserFromGroup(String userName, String groupName)
          Removes an user from a specified group.
 boolean userExists(String username)
          Check if user with given username exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsersAndGroupsImpl

public UsersAndGroupsImpl(net.sourceforge.jwebunit.WebTester tester,
                          Navigation navigation,
                          TextAssertions text,
                          LocatorFactory locators)
Method Detail

addUser

public void addUser(String username)
Creates a user with the given username and the same password, fullname and an email address username@example.com

Specified by:
addUser in interface UsersAndGroups
Parameters:
username - the username.

userExists

public boolean userExists(String username)
Description copied from interface: UsersAndGroups
Check if user with given username exists.

Specified by:
userExists in interface UsersAndGroups
Parameters:
username - username to check.
Returns:
true if the user exists; otherwise false.

addUser

public void addUser(String username,
                    String password,
                    String fullname,
                    String emailAddress)
Description copied from interface: UsersAndGroups
Adds a user with specified values.

Specified by:
addUser in interface UsersAndGroups
Parameters:
username - username
password - user password
fullname - user's fullname
emailAddress - email address of user

addUser

public void addUser(String username,
                    String password,
                    String fullname,
                    String emailAddress,
                    boolean sendEmail)
Description copied from interface: UsersAndGroups
Adds a user with specified values.

Specified by:
addUser in interface UsersAndGroups
Parameters:
username - username
password - user password
fullname - user's fullname
emailAddress - email address of user
sendEmail - flag to send a notification email to the new user

addUserWithoutVerifyingResult

public void addUserWithoutVerifyingResult(String username,
                                          String password,
                                          String fullname,
                                          String emailAddress)
Description copied from interface: UsersAndGroups
Attempts to add a user with specified values, but does not verify that the add succeeded. This is intended for use in tests that are specifically checking for failing conditions.

Specified by:
addUserWithoutVerifyingResult in interface UsersAndGroups
Parameters:
username - username
password - user password
fullname - user's fullname
emailAddress - email address of user

addUserWithoutVerifyingResult

public void addUserWithoutVerifyingResult(String username,
                                          String password,
                                          String fullname,
                                          String emailAddress,
                                          boolean sendEmail)
Description copied from interface: UsersAndGroups
Attempts to add a user with specified values, but does not verify that the add succeeded. This is intended for use in tests that are specifically checking for failing conditions.

Specified by:
addUserWithoutVerifyingResult in interface UsersAndGroups
Parameters:
username - username
password - user password
fullname - user's fullname
emailAddress - email address of user
sendEmail - flag to send a notification email to the new user

deleteUser

public void deleteUser(String username)
Description copied from interface: UsersAndGroups
Removes a user given the username. This will throw an error if no user with the username exists.

Specified by:
deleteUser in interface UsersAndGroups
Parameters:
username - The username of the user to delete.

deleteGroup

public void deleteGroup(String groupname)
Description copied from interface: UsersAndGroups
Removes a group given the groupname. This will throw an error if no group with that groupname exists.

Specified by:
deleteGroup in interface UsersAndGroups
Parameters:
groupname - The name of the group to delete.

gotoViewUser

public void gotoViewUser(String username)
Description copied from interface: UsersAndGroups
Navigate to the view user page in the admin section for the given user.

Specified by:
gotoViewUser in interface UsersAndGroups
Parameters:
username - The username of the user to view.

gotoUserBrowser

public void gotoUserBrowser()
Description copied from interface: UsersAndGroups
Navigate to the user browser page.

Specified by:
gotoUserBrowser in interface UsersAndGroups

gotoEditUser

public EditUserPage gotoEditUser(String username)
Description copied from interface: UsersAndGroups
Navigate to the edit user page in the admin section for the given user.

Specified by:
gotoEditUser in interface UsersAndGroups
Parameters:
username - The username of the user to edit.

addUserToGroup

public void addUserToGroup(String userName,
                           String groupName)
Description copied from interface: UsersAndGroups
Adds the specified user to the specified group

Specified by:
addUserToGroup in interface UsersAndGroups
Parameters:
userName - the user to add.
groupName - the group to join.

addGroup

public void addGroup(String groupName)
Description copied from interface: UsersAndGroups
Adds the specified group.

Specified by:
addGroup in interface UsersAndGroups
Parameters:
groupName - the name of the group to create.

removeUserFromGroup

public void removeUserFromGroup(String userName,
                                String groupName)
Description copied from interface: UsersAndGroups
Removes an user from a specified group.

Specified by:
removeUserFromGroup in interface UsersAndGroups
Parameters:
userName - The name of the user to remove from the group.
groupName - The name of the group to remove the user from.


Copyright © 2002-2014 Atlassian. All Rights Reserved.