|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase
com.atlassian.crowd.acceptance.tests.rest.service.AuthenticationResourceTest
public class AuthenticationResourceTest
Note that this test class is reused in JIRA via inheritance. Please be mindful of that when making changes to this class.
| Field Summary |
|---|
| Fields inherited from class com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase |
|---|
APPLICATION_NAME, APPLICATION_PASSWORD, ATTRIBUTES_RESOURCE, AUTHENTICATION_RESOURCE, GROUPS_RESOURCE, REST_SERVICE_NAME, SESSION_RESOURCE, USERS_RESOURCE |
| Constructor Summary | |
|---|---|
AuthenticationResourceTest(java.lang.String name)
Constructs a test case with the given name. |
|
AuthenticationResourceTest(java.lang.String name,
RestServer restServer)
Constructs a test case with the given name, using the given RestServer. |
|
| Method Summary | |
|---|---|
void |
testUserAuthentication_AllowAllToAuthenticate()
Tests that the Authentication resource will successfully authenticate a user that is not explicitly in an authorised group of the application but is in a directory where all the users are allowed to authenticate with the application. |
void |
testUserAuthentication_BadCredentials()
Tests that the Authentication resource will return a 400 (Bad Request) status if the user authentication details are incorrect. |
void |
testUserAuthentication_CommonUserUnauthorised()
Tests that the Authentication resource will only authenticate the first user that it finds with the specified username. |
void |
testUserAuthentication_NestedUser()
Tests that the Authentication resource will successfully authenticate a nested user. |
void |
testUserAuthentication_NoUser()
Tests that the Authentication resource will return a 400 (Bad Request) status if there is no such user. |
void |
testUserAuthentication_UnauthorisedGroupUser()
Tests that the Authentication resource will return a 400 (Bad Request) status if the authentication for the user is correct but the user is not a member of an authorised group of the application. |
void |
testUserAuthentication()
Tests that the Authentication resource correctly authenticates a valid user. |
| Methods inherited from class com.atlassian.crowd.acceptance.tests.rest.service.RestCrowdServiceAcceptanceTestCase |
|---|
authenticateUser, getBaseUriBuilder, getRootWebResource, getWebResource, setRestServer, setUp, statusToString, tearDown |
| 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, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AuthenticationResourceTest(java.lang.String name)
name - the test name
public AuthenticationResourceTest(java.lang.String name,
RestServer restServer)
name - the test namerestServer - the RestServer| Method Detail |
|---|
public void testUserAuthentication()
public void testUserAuthentication_BadCredentials()
public void testUserAuthentication_NoUser()
public void testUserAuthentication_UnauthorisedGroupUser()
public void testUserAuthentication_AllowAllToAuthenticate()
public void testUserAuthentication_CommonUserUnauthorised()
public void testUserAuthentication_NestedUser()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||