public class AuthenticationResourceTest extends RestCrowdServiceAcceptanceTestCase
APPLICATION_NAME, APPLICATION_PASSWORD, ATTRIBUTES_RESOURCE, AUTHENTICATION_RESOURCE, EVENTS_RESOURCE, GROUP1, GROUP2, GROUP3, GROUP4, GROUPS_RESOURCE, MT, NON_ADMIN_USER_NAME, NON_ADMIN_USER_PASSWORD, NON_EXISTENT_GROUP, NON_EXISTENT_USER, REST_SERVICE_NAME, SESSION_RESOURCE, USERNAME_PARAM, USERNAME1, USERNAME1_PASSWORD, USERNAME2, USERNAME2_PASSWORD, USERNAME3, USERS_RESOURCE, WEBHOOKS_RESOURCE| Constructor and Description |
|---|
AuthenticationResourceTest(String name)
Constructs a test case with the given name.
|
AuthenticationResourceTest(String name,
RestServer restServer)
Constructs a test case with the given name, using the given RestServer.
|
| Modifier and Type | Method and Description |
|---|---|
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_InactiveUser()
Tests that the Authentication resource will return a 400 (Bad Request) status if the user is inactive.
|
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.
|
authenticateUser, authenticateUser, deactivateUser, getBaseUriBuilder, getBaseUriBuilder, getBaseUriBuilder, getRootWebResource, getServerUriBuilder, getWebResource, getWebResource, requestEvents, requestEventToken, setRestServer, setUp, tearDownassertEquals, 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, runBare, runTest, setName, toStringpublic AuthenticationResourceTest(String name)
name - the test namepublic AuthenticationResourceTest(String name, RestServer restServer)
name - the test namerestServer - the RestServerpublic void testUserAuthentication()
public void testUserAuthentication_BadCredentials()
public void testUserAuthentication_InactiveUser()
public void testUserAuthentication_NoUser()
public void testUserAuthentication_UnauthorisedGroupUser()
public void testUserAuthentication_AllowAllToAuthenticate()
public void testUserAuthentication_CommonUserUnauthorised()
public void testUserAuthentication_NestedUser()
Copyright © 2018 Atlassian. All rights reserved.