|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
net.sourceforge.jwebunit.junit.WebTestCase
com.atlassian.crowd.acceptance.utils.CrowdWebTestCase
com.atlassian.crowd.acceptance.tests.applications.crowd.CrowdAcceptanceTestCase
com.atlassian.crowd.acceptance.tests.rest.service.client.RestCrowdClientTest
public class RestCrowdClientTest
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, DEVELOPER_LICENSE_KEY, EXPIRED_MAINTENANCE_KEY, HOST_PATH, logger, specProperties, UNLIMITED_LICENSE_KEY, URL_HOME, WORKGROUP_LICENSE_KEY |
| Fields inherited from class net.sourceforge.jwebunit.junit.WebTestCase |
|---|
customTester, tester |
| Constructor Summary | |
|---|---|
RestCrowdClientTest()
|
|
| Method Summary | |
|---|---|
void |
setUp()
|
void |
testAddGroupToGroup()
|
void |
testAddGroupToGroupWhenMembershipAlreadyExists()
|
void |
testAddUser()
|
void |
testAddUserToGroup()
|
void |
testAddUserToGroupWhenMembershipAlreadyExists()
|
void |
testConnectToInvalidRestService()
Tests that RestCrowdClient throws an OperationFailedException if the RestCrowdClient is not
communicating with a valid Crowd REST service. |
void |
testConnectToRestService_WrongPassword()
Tests that RestCrowdClient throws an InvalidAuthenticationException if the application password
is invalid. |
void |
testFindUserFromInvalidSSOToken()
|
void |
testFindUserFromNonExistentSSOToken()
|
void |
testFindUserFromValidSSOToken()
|
void |
testGetGroupNameMembershipsForGroup_InvalidStartIndex()
Tests that CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) with an invalid start index will
throw an OperationFailedException. |
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 |
testGetMemberships()
Tests that RestCrowdClient.getMemberships() returns successfully. |
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 |
testGetNonExistingWebhook()
|
void |
testGetUser()
|
void |
testInvalidateAllOtherSSOTokensForUser()
|
void |
testInvalidateAllSSOTokensForUser()
|
void |
testMailUsernamesFailsWithUnknownAddress()
|
void |
testQueryForNullFirstNames()
|
void |
testSSOUserWithDefaultTokenDuration()
|
void |
testSSOUserWithZeroLivedToken()
|
void |
testUnregisterNonExistingWebhook()
|
void |
testUpdateGroupWithAttributes()
|
void |
testUpdateUserCredential()
|
void |
testUpdateUserCredentialPasswordDoesNotMatchDirectoryComplexityRequirement()
|
| Methods inherited from class net.sourceforge.jwebunit.junit.WebTestCase |
|---|
assertButtonNotPresent, assertButtonNotPresentWithText, assertButtonPresent, assertButtonPresentWithText, assertCheckboxNotPresent, assertCheckboxNotPresent, assertCheckboxNotSelected, assertCheckboxNotSelected, assertCheckboxPresent, assertCheckboxPresent, assertCheckboxSelected, assertCheckboxSelected, assertCommentNotPresent, assertCommentPresent, assertCookiePresent, assertCookieValueEquals, assertCookieValueMatch, assertDownloadedFileEquals, assertElementNotPresent, assertElementNotPresentByXPath, assertElementPresent, assertElementPresentByXPath, assertFormElementEmpty, assertFormElementEquals, assertFormElementMatch, assertFormElementNotPresent, assertFormElementPresent, assertFormNotPresent, assertFormNotPresent, assertFormPresent, assertFormPresent, assertFramePresent, assertHeaderEquals, assertHeaderMatches, assertHeaderNotPresent, assertHeaderPresent, assertHiddenFieldPresent, assertImagePresent, assertImagePresentPartial, assertImageValid, assertImageValidAndStore, assertKeyInTable, assertKeyInTable, assertKeyNotInTable, assertKeyNotPresent, assertKeyNotPresent, assertKeyPresent, assertKeysInTable, assertKeysInTable, assertLabeledFieldEquals, assertLabelMatches, assertLabelPresent, assertLinkNotPresent, assertLinkNotPresentWithExactText, assertLinkNotPresentWithExactText, assertLinkNotPresentWithImage, assertLinkNotPresentWithImage, assertLinkNotPresentWithText, assertLinkNotPresentWithText, assertLinkPresent, assertLinkPresentWithExactText, assertLinkPresentWithExactText, assertLinkPresentWithImage, assertLinkPresentWithImage, assertLinkPresentWithText, assertLinkPresentWithText, assertMatch, assertMatch, assertMatch, assertMatchInElement, assertMatchInTable, assertMatchInTable, assertNoMatch, assertNoMatchInElement, assertNoMatchInTable, assertNoMatchInTable, assertNotMatch, assertNotMatch, assertRadioOptionNotPresent, assertRadioOptionNotSelected, assertRadioOptionPresent, assertRadioOptionSelected, assertResetButtonNotPresent, assertResetButtonNotPresent, assertResetButtonPresent, assertResetButtonPresent, assertResponseCode, assertResponseCodeBetween, assertSelectedOptionEquals, assertSelectedOptionEquals, assertSelectedOptionMatches, assertSelectedOptionMatches, assertSelectedOptionsEqual, assertSelectedOptionsEqual, assertSelectedOptionsMatch, assertSelectedOptionsMatch, assertSelectedOptionValueEquals, assertSelectedOptionValueEquals, assertSelectedOptionValuesEqual, assertSelectedOptionValuesEqual, assertSelectOptionNotPresent, assertSelectOptionNotPresent, assertSelectOptionPresent, assertSelectOptionPresent, assertSelectOptionsEqual, assertSelectOptionsEqual, assertSelectOptionsNotEqual, assertSelectOptionsNotEqual, assertSelectOptionsPresent, assertSelectOptionsPresent, assertSelectOptionValueNotPresent, assertSelectOptionValueNotPresent, assertSelectOptionValuePresent, assertSelectOptionValuePresent, assertSelectOptionValuesEqual, assertSelectOptionValuesEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesNotEqual, assertSelectOptionValuesPresent, assertSelectOptionValuesPresent, 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, assertTitleEqualsKey, assertTitleMatch, assertTitleNotEquals, assertTitleNotSame, assertWindowCountEquals, assertWindowPresent, assertWindowPresent, assertWindowPresentWithTitle, beginAt, checkCheckbox, checkCheckbox, clickButton, clickButtonWithText, clickElementByXPath, clickLink, clickLinkWithExactText, clickLinkWithExactText, clickLinkWithImage, clickLinkWithImage, clickLinkWithText, clickLinkWithText, clickRadioOption, closeBrowser, closeWindow, dumpCookies, dumpHtml, dumpHtml, dumpTable, dumpTable, getAllHeaders, getComments, getDialog, getElementAttributByXPath, getElementAttributeByXPath, getElementById, getElementByXPath, getElementsByXPath, getElementTextByXPath, getFieldsForLabel, getFormElementValue, getHeader, getImage, getLabeledFieldValue, getMessage, getMessage, getPageSource, getResponseHeaders, getServerResponse, getServeurResponse, getTable, getTestContext, getTester, getTestingEngine, getTestingEngineKey, gotoFrame, gotoPage, gotoRootWindow, gotoWindow, gotoWindow, gotoWindowByTitle, reset, runBare, saveAs, selectOption, selectOption, selectOptionByValue, selectOptionByValue, selectOptions, selectOptions, selectOptionsByValues, selectOptionsByValues, setBaseUrl, setBaseUrl, setDialog, setExpectedJavaScriptAlert, setExpectedJavaScriptAlert, setExpectedJavaScriptConfirm, setExpectedJavaScriptConfirm, setExpectedJavaScriptPrompt, setExpectedJavaScriptPrompt, setFormElement, setHiddenField, setIgnoreFailingStatusCodes, setLabeledFormElementField, setScriptingEnabled, setTestContext, setTestingEngineKey, setTextField, setTimeout, setWorkingForm, setWorkingForm, setWorkingForm, submit, submit, submit, uncheckCheckbox, uncheckCheckbox |
| Methods inherited from class junit.framework.TestCase |
|---|
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RestCrowdClientTest()
| Method Detail |
|---|
public void setUp()
throws Exception
setUp in class CrowdAcceptanceTestCaseException
public void testGetUser()
throws Exception
Exception
public void testGetGroupNameMembershipsForGroup()
throws Exception
CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) retrieves the correct parent
group names.
Exception
public void testGetGroupNameMembershipsForGroup_InvalidStartIndex()
throws Exception
CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) with an invalid start index will
throw an OperationFailedException.
Exception
public void testGetGroupNameMembershipsForGroup_NonExistentGroup()
throws Exception
CrowdClient.getNamesOfParentGroupsForGroup(String, int, int) for a non-existent group returns an empty list.
Exception
public void testGetNestedUserNameMembersOfGroup()
throws Exception
CrowdClient.getNamesOfNestedUsersOfGroup(String, int, int) returns the correct user names
of nested members of a group.
Exception
public void testGetNestedUserNameMembersOfGroup_NonExistentGroup()
throws Exception
CrowdClient.getNamesOfNestedUsersOfGroup(String, int, int) returns an empty list for a
non-existent group.
Exception
public void testGetNestedGroupMembersOfGroup()
throws Exception
CrowdClient.getNestedChildGroupsOfGroup(String, int, int) returns the nested group members
of group.
Exception
public void testGetNestedGroupMembersOfGroup_NonExistentGroup()
throws Exception
CrowdClient.getNestedChildGroupsOfGroup(String, int, int) returns an empty list for a
non-existent group.
Exception
public void testGetNestedGroupNameMembersOfGroup()
throws Exception
CrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int) returns the group names of
nested group members.
Exception
public void testGetNestedGroupNameMembersOfGroup_NonExistent()
throws Exception
CrowdClient.getNamesOfNestedChildGroupsOfGroup(String, int, int) returns an empty list for a
non-existent group.
Exception
public void testGetNestedGroupMembershipsForUser()
throws Exception
CrowdClient.getGroupsForNestedUser(String, int, int) returns the correct nested
group memberships for a user.
Exception
public void testGetNestedGroupMembershipsForUser_NonExistent()
throws Exception
CrowdClient.getGroupsForNestedUser(String, int, int) returns an empty list for a
non-existent username.
Exception
public void testGetNestedGroupNameMembershipsForUser()
throws Exception
CrowdClient.getNamesOfGroupsForNestedUser(String, int, int) returns the correct group
names for a nested user member
Exception
public void testGetNestedGroupNameMembershipsForUser_NonExistent()
throws Exception
CrowdClient.getNamesOfGroupsForNestedUser(String, int, int) returns an empty list
for a non-existent username.
Exception
public void testGetNestedGroupMembershipsForGroup()
throws Exception
CrowdClient.getParentGroupsForNestedGroup(String, int, int) returns the correct nested
group memberships for a group.
Exception
public void testGetNestedGroupMembershipsForGroup_NonExistent()
throws Exception
CrowdClient.getParentGroupsForNestedGroup(String, int, int) returns an empty list for a
non-existent group.
Exception
public void testGetNestedGroupNameMembershipsForGroup()
throws Exception
CrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int) returns the correct nested
group name memberships of a group.
Exception
public void testGetNestedGroupNameMembershipsForGroup_NonExistent()
throws Exception
CrowdClient.getNamesOfParentGroupsForNestedGroup(String, int, int) returns an empty list for
a non-existent group.
Exception
public void testAddUser()
throws Exception
Exception
public void testUpdateUserCredential()
throws Exception
Exception
public void testUpdateUserCredentialPasswordDoesNotMatchDirectoryComplexityRequirement()
throws Exception
Exception
public void testConnectToInvalidRestService()
throws Exception
RestCrowdClient throws an OperationFailedException if the RestCrowdClient is not
communicating with a valid Crowd REST service.
Exception
public void testConnectToRestService_WrongPassword()
throws Exception
RestCrowdClient throws an InvalidAuthenticationException if the application password
is invalid.
Exception
public void testGetMemberships()
throws Exception
RestCrowdClient.getMemberships() returns successfully. The content of the response
is tested by GroupsResourceTest#testGetMembershipsReturnsExactlyExpectedMemberships in crowd-rest-test.
Exception
public void testQueryForNullFirstNames()
throws Exception
Exception
public void testMailUsernamesFailsWithUnknownAddress()
throws Exception
Exception
public void testUpdateGroupWithAttributes()
throws Exception
Exception
public void testSSOUserWithDefaultTokenDuration()
throws Exception
Exception
public void testSSOUserWithZeroLivedToken()
throws Exception
Exception
public void testInvalidateAllSSOTokensForUser()
throws Exception
Exception
public void testInvalidateAllOtherSSOTokensForUser()
throws Exception
Exception
public void testFindUserFromValidSSOToken()
throws Exception
Exception
public void testFindUserFromInvalidSSOToken()
throws Exception
Exception
public void testFindUserFromNonExistentSSOToken()
throws Exception
Exception
public void testGetNonExistingWebhook()
throws Exception
Exception
public void testUnregisterNonExistingWebhook()
throws Exception
Exception
public void testAddUserToGroup()
throws Exception
Exception
public void testAddUserToGroupWhenMembershipAlreadyExists()
throws Exception
Exception
public void testAddGroupToGroup()
throws Exception
Exception
public void testAddGroupToGroupWhenMembershipAlreadyExists()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||