com.atlassian.crowd.acceptance.tests.rest.service.client
Class RestCrowdClientTest

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.applications.crowd.CrowdAcceptanceTestCase
                  extended by com.atlassian.crowd.acceptance.tests.rest.service.client.RestCrowdClientTest
All Implemented Interfaces:
junit.framework.Test

public class RestCrowdClientTest
extends CrowdAcceptanceTestCase

Tests the RestCrowdClient.


Field Summary
 
Fields inherited from class com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdAcceptanceTestCase
ADMIN_EMAIL, ADMIN_FULL_NAME, ADMIN_GROUP, ADMIN_PW, ADMIN_USER, CONSOLE_PORT, CONTEXT_PATH, DEVELOPER_LICENSE_KEY, 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
RestCrowdClientTest()
           
 
Method Summary
 void setUp()
           
 void testGetGroupNameMembershipsForGroup_InvalidStartIndex()
          Tests that CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) with an invalid start index will throw an IllegalArgumentException.
 void testGetGroupNameMembershipsForGroup_NonExistentGroup()
          Tests that CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) for a non-existent group returns an empty list.
 void testGetGroupNameMembershipsForGroup()
          Tests that CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) retrieves the correct parent group names.
 void testGetNestedGroupMembershipsForGroup_NonExistent()
          Tests that CrowdClient.getParentGroupsForNestedGroup(String, int, int) returns an empty list for a non-existent group.
 void testGetNestedGroupMembershipsForGroup()
          Tests that CrowdClient.getParentGroupsForNestedGroup(String, int, int) returns the correct nested group memberships for a group.
 void testGetNestedGroupMembershipsForUser_NonExistent()
          Tests that CrowdClient.getGroupsForNestedUser(String, int, int) returns an empty list for a non-existent username.
 void testGetNestedGroupMembershipsForUser()
          Tests that CrowdClient.getGroupsForNestedUser(String, int, int) returns the correct nested group memberships for a user.
 void testGetNestedGroupMembersOfGroup_NonExistentGroup()
          Tests that CrowdClient.getNestedChildGroupsOfGroup(String, int, int) returns an empty list for a non-existent group.
 void testGetNestedGroupMembersOfGroup()
          Tests that CrowdClient.getNestedChildGroupsOfGroup(String, int, int) returns the nested group members of group.
 void testGetNestedGroupNameMembershipsForGroup_NonExistent()
          Tests that CrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int) returns an empty list for a non-existent group.
 void testGetNestedGroupNameMembershipsForGroup()
          Tests that CrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int) returns the correct nested group name memberships of a group.
 void testGetNestedGroupNameMembershipsForUser_NonExistent()
          Tests that CrowdClient.getNamesOfGroupsForNestedUser(String, int, int) returns an empty list for a non-existent username.
 void testGetNestedGroupNameMembershipsForUser()
          Tests that CrowdClient.getNamesOfGroupsForNestedUser(String, int, int) returns the correct group names for a nested user member
 void testGetNestedGroupNameMembersOfGroup_NonExistent()
          Tests that CrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int) returns an empty list for a non-existent group.
 void testGetNestedGroupNameMembersOfGroup()
          Tests that CrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int) returns the group names of nested group members.
 void testGetNestedUserNameMembersOfGroup_NonExistentGroup()
          Tests that CrowdClient.getNamesOfNestedUsersOfGroup(String, int, int) returns an empty list for a non-existent group.
 void testGetNestedUserNameMembersOfGroup()
          Tests that CrowdClient.getNamesOfNestedUsersOfGroup(String, int, int) returns the correct user names of nested members of a group.
 void testGetUser()
           
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdAcceptanceTestCase
_getTestProperty, _loginAdminUser, _loginAsUser, _logout, addRole, assertUserInTable, assertUserInTable, assertUserNotInTable, getBaseUrl, getCrowdApplicationPassword, getCrowdContext, getCrowdHome, getText, gotoAddApplication, gotoAddGroup, gotoAddPrincipal, gotoAddRole, gotoBackup, gotoBrowseApplications, gotoBrowseDirectories, gotoBrowseGroups, gotoBrowseGroups, gotoBrowsePrincipals, gotoBrowsePrincipals, gotoBrowseRoles, gotoCreateDirectory, gotoCurrentApplicationSessions, gotoCurrentPrincipalSessions, gotoGeneral, gotoImporters, gotoLdapConnectionPool, gotoLicensing, gotoLoggingProfiling, gotoMailServer, gotoMailTemplate, gotoRemovePrincipal, gotoRestore, gotoSAMLConfig, gotoSessionConfig, gotoSystemInfo, gotoTrustedProxies, gotoViewApplication, gotoViewGroup, gotoViewPrincipal, gotoViewRole, log, restoreBaseSetup, restoreCrowdFromXML, restoreCrowdFromXMLWithoutReloggingIn, restoreCrowdFromXMLWithoutReloggingIn, tearDown
 
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, 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, getElementAttributeByXPath, getElementTextById, getElementTextByXPath, getFormElementValue, getMessage, getPageSource, getPageText, getServerResponse, getTable, getTestContext, getTester, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, isTextPresent, 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, waitForText, waitForText
 
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

RestCrowdClientTest

public RestCrowdClientTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Overrides:
setUp in class CrowdAcceptanceTestCase
Throws:
java.lang.Exception

testGetUser

public void testGetUser()

testGetGroupNameMembershipsForGroup

public void testGetGroupNameMembershipsForGroup()
Tests that CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) retrieves the correct parent group names.


testGetGroupNameMembershipsForGroup_InvalidStartIndex

public void testGetGroupNameMembershipsForGroup_InvalidStartIndex()
Tests that CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) with an invalid start index will throw an IllegalArgumentException.


testGetGroupNameMembershipsForGroup_NonExistentGroup

public void testGetGroupNameMembershipsForGroup_NonExistentGroup()
Tests that CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) for a non-existent group returns an empty list.


testGetNestedUserNameMembersOfGroup

public void testGetNestedUserNameMembersOfGroup()
Tests that CrowdClient.getNamesOfNestedUsersOfGroup(String, int, int) returns the correct user names of nested members of a group.


testGetNestedUserNameMembersOfGroup_NonExistentGroup

public void testGetNestedUserNameMembersOfGroup_NonExistentGroup()
Tests that CrowdClient.getNamesOfNestedUsersOfGroup(String, int, int) returns an empty list for a non-existent group.


testGetNestedGroupMembersOfGroup

public void testGetNestedGroupMembersOfGroup()
Tests that CrowdClient.getNestedChildGroupsOfGroup(String, int, int) returns the nested group members of group.


testGetNestedGroupMembersOfGroup_NonExistentGroup

public void testGetNestedGroupMembersOfGroup_NonExistentGroup()
Tests that CrowdClient.getNestedChildGroupsOfGroup(String, int, int) returns an empty list for a non-existent group.


testGetNestedGroupNameMembersOfGroup

public void testGetNestedGroupNameMembersOfGroup()
Tests that CrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int) returns the group names of nested group members.


testGetNestedGroupNameMembersOfGroup_NonExistent

public void testGetNestedGroupNameMembersOfGroup_NonExistent()
Tests that CrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int) returns an empty list for a non-existent group.


testGetNestedGroupMembershipsForUser

public void testGetNestedGroupMembershipsForUser()
Tests that CrowdClient.getGroupsForNestedUser(String, int, int) returns the correct nested group memberships for a user.


testGetNestedGroupMembershipsForUser_NonExistent

public void testGetNestedGroupMembershipsForUser_NonExistent()
Tests that CrowdClient.getGroupsForNestedUser(String, int, int) returns an empty list for a non-existent username.


testGetNestedGroupNameMembershipsForUser

public void testGetNestedGroupNameMembershipsForUser()
Tests that CrowdClient.getNamesOfGroupsForNestedUser(String, int, int) returns the correct group names for a nested user member


testGetNestedGroupNameMembershipsForUser_NonExistent

public void testGetNestedGroupNameMembershipsForUser_NonExistent()
Tests that CrowdClient.getNamesOfGroupsForNestedUser(String, int, int) returns an empty list for a non-existent username.


testGetNestedGroupMembershipsForGroup

public void testGetNestedGroupMembershipsForGroup()
Tests that CrowdClient.getParentGroupsForNestedGroup(String, int, int) returns the correct nested group memberships for a group.


testGetNestedGroupMembershipsForGroup_NonExistent

public void testGetNestedGroupMembershipsForGroup_NonExistent()
Tests that CrowdClient.getParentGroupsForNestedGroup(String, int, int) returns an empty list for a non-existent group.


testGetNestedGroupNameMembershipsForGroup

public void testGetNestedGroupNameMembershipsForGroup()
Tests that CrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int) returns the correct nested group name memberships of a group.


testGetNestedGroupNameMembershipsForGroup_NonExistent

public void testGetNestedGroupNameMembershipsForGroup_NonExistent()
Tests that CrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int) returns an empty list for a non-existent group.



Copyright © 2010 Atlassian. All Rights Reserved.