Merge from SEAMIST3

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10724 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2008-09-04 10:53:14 +00:00
parent d4bb800e1d
commit 703d1a3564
34 changed files with 11523 additions and 1160 deletions

View File

@@ -70,7 +70,7 @@ public abstract class BaseWebScriptTest extends TestCase
{
return sendRequest(METHOD_GET, url, expectedStatus, null, null);
}
/**
* "DELETE" the url and check for the expected status code
*
@@ -97,6 +97,20 @@ public abstract class BaseWebScriptTest extends TestCase
*/
protected MockHttpServletResponse postRequest(String url, int expectedStatus, String body, String contentType)
throws IOException
{
return postRequest(url, expectedStatus, body.getBytes(), contentType);
}
/**
* "POST" the url and check for the expected status code
*
* @param url
* @param expectedStatus
* @return
* @throws IOException
*/
protected MockHttpServletResponse postRequest(String url, int expectedStatus, byte[] body, String contentType)
throws IOException
{
return sendRequest(METHOD_POST, url, expectedStatus, body, contentType);
}
@@ -125,7 +139,7 @@ public abstract class BaseWebScriptTest extends TestCase
* @return
* @throws IOException
*/
private MockHttpServletResponse sendRequest(String method, String url, int expectedStatus, String body, String contentType)
private MockHttpServletResponse sendRequest(String method, String url, int expectedStatus, byte[] body, String contentType)
throws IOException
{
MockHttpServletResponse response = BaseWebScriptTest.getServer().submitRequest(method, url, new HashMap<String, String>(), body, contentType);