|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.acceptance.tests.rest.service.ApplicationResourceTest
public class ApplicationResourceTest
Tests for the Application resource
Field Summary | |
---|---|
protected static String |
APPLICATION_RESOURCE
|
protected static long |
CROWD_APPLICATION_ID
|
protected static String |
CROWD_APPLICATION_NAME
|
protected static String |
REST_SERVICE_NAME
|
protected static String |
USER_NAME
|
protected static String |
USER_PASSWORD
|
Constructor Summary | |
---|---|
ApplicationResourceTest()
|
Method Summary | |
---|---|
protected long |
getApplicationId()
Returns the application ID. |
protected String |
getApplicationName()
Returns the application name. |
protected ApplicationType |
getApplicationType()
Returns the application type. |
protected javax.ws.rs.core.UriBuilder |
getBaseUriBuilder()
Returns the base URI of the REST service. |
protected com.sun.jersey.api.client.WebResource |
getRootWebResource(String userName,
String password)
Returns the "root" WebResource. |
protected com.sun.jersey.api.client.WebResource |
getWebResource(String userName,
String password,
URI uri)
Returns the WebResource with the specified URI. |
void |
setUp()
|
void |
tearDown()
|
void |
testAddApplication_NoName()
Tests that adding an application with no name will fail with a 400 (Bad Request) with a reason of Illegal Argument. |
void |
testAddApplication_NoPassword()
Tests that adding an application with no password will fail with a 400 (Bad Request) with a reason of Invalid Credential. |
void |
testAddApplication_NoType()
Tests that adding an application with no type will fail with a 400 (Bad Request) with a reason of Illegal Argument. |
void |
testAddApplication()
Tests that adding an application is successful. |
void |
testAddApplicationWithRequestAddress_WithProxy()
Tests adding an application with the request address included, and simulating a proxy being involved (i.e. |
void |
testAddApplicationWithRequestAddress()
Tests adding an application with the request address included. |
void |
testAddRemoteAddress()
Tests that adding a remote address is successful. |
void |
testGetApplicationById_NotFound()
Tests that retrieving a non-existent application by ID will return a 404 (Not Found) response with a reason of Application Not Found. |
void |
testGetApplicationById()
Tests that the REST service allows an application to be retrieved by ID |
void |
testGetApplicationByName_NotFound()
Tests that retrieving a non-existent application by name will return a 404 (Not Found) response with a reason of Application Not Found. |
void |
testGetApplicationByName()
Tests that the REST service allows an application to be retrieved by name |
void |
testWrongPassword()
Tests that the REST service does not allow a user to access the Application Management API if an incorrect user password has been given. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String USER_NAME
protected static final String USER_PASSWORD
protected static final String APPLICATION_RESOURCE
protected static final long CROWD_APPLICATION_ID
protected static final String CROWD_APPLICATION_NAME
protected static final String REST_SERVICE_NAME
Constructor Detail |
---|
public ApplicationResourceTest()
Method Detail |
---|
public void setUp() throws Exception
Exception
public void tearDown() throws Exception
Exception
protected long getApplicationId()
protected String getApplicationName()
protected ApplicationType getApplicationType()
protected javax.ws.rs.core.UriBuilder getBaseUriBuilder()
protected com.sun.jersey.api.client.WebResource getRootWebResource(String userName, String password)
userName
- name of the userpassword
- password of the user
protected com.sun.jersey.api.client.WebResource getWebResource(String userName, String password, URI uri)
userName
- name of the userpassword
- password of the useruri
- URI of the resource
public void testGetApplicationByName() throws Exception
Exception
public void testGetApplicationByName_NotFound() throws Exception
Exception
public void testGetApplicationById() throws Exception
Exception
public void testGetApplicationById_NotFound() throws Exception
Exception
public void testWrongPassword() throws Exception
Exception
public void testAddApplication() throws Exception
Exception
public void testAddApplication_NoPassword() throws Exception
Exception
public void testAddApplication_NoName() throws Exception
Exception
public void testAddApplication_NoType() throws Exception
Exception
public void testAddRemoteAddress() throws Exception
Exception
public void testAddApplicationWithRequestAddress()
public void testAddApplicationWithRequestAddress_WithProxy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |