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

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
              extended by com.atlassian.crowd.acceptance.tests.console.CrowdAcceptanceTestCase
                  extended by com.atlassian.crowd.acceptance.tests.clientlib.NestedGroupsBase
                      extended by com.atlassian.crowd.acceptance.tests.clientlib.osuser.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
 
Fields inherited from class com.atlassian.crowd.acceptance.tests.console.CrowdAcceptanceTestCase
ADMIN_EMAIL, ADMIN_FULL_NAME, ADMIN_GROUP, ADMIN_PW, ADMIN_USER, CONSOLE_PORT, CONTEXT_PATH, EXPIRED_MAINTENANCE_KEY, HOST, HOST_PATH, logger, specProperties, UNLIMITED_LICENSE_KEY, URL_HOME, WAR_PATH, WORKGROUP_LICENSE_KEY
 
Fields inherited from class com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
tester
 
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 CrowdAccessProvider, as used by JIRA+OSUser.
 
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 com.atlassian.crowd.acceptance.tests.console.CrowdAcceptanceTestCase
_getTestProperty, _loginAdminUser, _logout, addRole, getBaseUrl, getCrowdContext, getCrowdHome, getText, gotoAddApplication, gotoAddGroup, gotoAddPrincipal, gotoAddRole, gotoBrowseApplications, gotoBrowseDirectories, gotoBrowseGroups, gotoBrowseGroups, gotoBrowsePrincipals, gotoBrowsePrincipals, gotoBrowseRoles, gotoCreateDirectory, gotoCurrentApplicationSessions, gotoCurrentPrincipalSessions, gotoGeneral, gotoImporters, gotoLicensing, gotoLoggingProfiling, gotoMailServer, gotoMailTemplate, gotoRestore, gotoSAMLConfig, gotoSessionConfig, gotoTrustedProxies, gotoViewApplication, gotoViewGroup, gotoViewPrincipal, gotoViewRole, log, restoreBaseSetup, restoreCrowdFromXML
 
Methods inherited from class com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
addRequestHeader, assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertErrorNotPresent, assertErrorPresent, assertErrorPresentWithKey, assertErrorPresentWithText, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHiddenFieldPresent, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyPresent, assertKeyPresent, assertKeysInTable, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresent, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithImage, assertLinkPresentWithKey, assertLinkPresentWithText, assertLinkPresentWithText, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertServerResponseContains, assertServerResponseDoesNotContain, assertSubmitButtonNotPresent, assertSubmitButtonNotPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertSubmitButtonPresent, assertTableEquals, assertTableEquals, assertTableMatch, assertTableMatch, assertTableNotPresent, assertTablePresent, assertTableRowCountEquals, assertTableRowsEqual, assertTableRowsEqual, assertTableRowsMatch, assertTableRowsMatch, assertTextFieldEquals, assertTextInElement, assertTextInTable, assertTextInTable, assertTextNotInElement, assertTextNotInTable, assertTextNotInTable, assertTextNotPresent, assertTextPresent, assertTitleEquals, assertTitleEqualsKey, assertTitleMatch, assertWarningAndErrorNotPresent, assertWarningNotPresent, assertWarningPresent, assertWarningPresentWithKey, assertWarningPresentWithText, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithExactText, clickLinkWithImage, clickLinkWithKey, clickLinkWithText, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, dumpTable, getDialog, getElementAttributByXPath, getElementTextByXPath, getFormElementValue, getMessage, getPageSource, getServerResponse, getTable, getTestContext, getTester, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOptionByValue, selectOptions, selectOptionsByValues, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setFormElement, setRadioButton, setScriptingEnabled, setTestContext, setTester, setTestingEngineKey, setTextField, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit, submit, uncheckCheckbox, uncheckCheckbox
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, 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, failNotEquals, failNotSame, failSame, format
 
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 CrowdAccessProvider, as used by JIRA+OSUser.

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.