com.atlassian.crowd.acceptance.tests.clientlib.atlassianuser
Class NestedGroupsTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.crowd.acceptance.tests.clientlib.NestedGroupsBase
              extended by com.atlassian.crowd.acceptance.tests.clientlib.atlassianuser.NestedGroupsTest
All Implemented Interfaces:
junit.framework.Test

public class NestedGroupsTest
extends NestedGroupsBase


Field Summary
 
Fields inherited from class com.atlassian.crowd.acceptance.tests.clientlib.NestedGroupsBase
securityServerClient
 
Constructor Summary
NestedGroupsTest()
           
 
Method Summary
 java.util.List getAllGroupNames()
           
 java.util.List getGroupsForUser(java.lang.String userName)
           
 java.util.List getUsersInGroup(java.lang.String groupName)
           
 boolean isGroupInList(java.util.Collection groupList, java.lang.String groupName)
          Checks if a group specified by groupName is in groupList.
 boolean isInGroup(java.lang.String userName, java.lang.String groupName)
           
 boolean isUserInList(java.util.Collection userList, java.lang.String userName)
           
 boolean removeUserFromGroup(java.lang.String userName, java.lang.String groupName)
           
protected  void setupClientLibrary()
          Creates an instance of a CrowdGroupManager, as used by atlassian-user (and hence Confluence + Bamboo).
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.clientlib.NestedGroupsBase
setUp, setupSecurityServer, tearDown, testInGroup_UserInParentGroup, testInGroup_UserInSubGroup, testInGroup_UserNotInGroup, testInGroup, testRemoveFromGroup_MemberOfGroup, testRemoveFromGroup_MemberOfSubGroup, testRemoveFromGroup_SubMemberOfSubGroup, testUsersByGroupMatchesGroupsByUser
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NestedGroupsTest

public NestedGroupsTest()
Method Detail

setupClientLibrary

protected void setupClientLibrary()
                           throws java.lang.Exception
Creates an instance of a CrowdGroupManager, as used by atlassian-user (and hence Confluence + Bamboo).

Specified by:
setupClientLibrary in class NestedGroupsBase
Throws:
java.lang.Exception

getAllGroupNames

public java.util.List getAllGroupNames()
                                throws java.lang.Exception
Specified by:
getAllGroupNames in class NestedGroupsBase
Throws:
java.lang.Exception

getUsersInGroup

public java.util.List getUsersInGroup(java.lang.String groupName)
                               throws java.lang.Exception
Specified by:
getUsersInGroup in class NestedGroupsBase
Throws:
java.lang.Exception

getGroupsForUser

public java.util.List getGroupsForUser(java.lang.String userName)
                                throws java.lang.Exception
Specified by:
getGroupsForUser in class NestedGroupsBase
Throws:
java.lang.Exception

isInGroup

public boolean isInGroup(java.lang.String userName,
                         java.lang.String groupName)
                  throws java.lang.Exception
Specified by:
isInGroup in class NestedGroupsBase
Throws:
java.lang.Exception

removeUserFromGroup

public boolean removeUserFromGroup(java.lang.String userName,
                                   java.lang.String groupName)
                            throws java.lang.Exception
Specified by:
removeUserFromGroup in class NestedGroupsBase
Throws:
java.lang.Exception

isUserInList

public boolean isUserInList(java.util.Collection userList,
                            java.lang.String userName)
Specified by:
isUserInList in class NestedGroupsBase

isGroupInList

public boolean isGroupInList(java.util.Collection groupList,
                             java.lang.String groupName)
Description copied from class: NestedGroupsBase
Checks if a group specified by groupName is in groupList. Not all interfaces return a Collection of Strings, so we may need interface-specific comparison ops. For example, atlassian-user returns a List

Specified by:
isGroupInList in class NestedGroupsBase
Parameters:
groupList - A list of groups as returned to the application using the interface
groupName - The name of a group
Returns:


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.