Merged HEAD (5.2) to 5.2.N (5.2.1)

126385 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
      120469 jvonka: FileFolder API - NodeApiTest - add test to retrieve content
      - also update test fwk to support post request body as byte array (as well as string)
      RA-641


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126731 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-05-11 10:56:47 +00:00
parent 08ac84ff25
commit 7801810028
5 changed files with 235 additions and 70 deletions

View File

@@ -76,7 +76,20 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
return response;
}
protected HttpResponse post(String url, String runAsUser, String body, String queryString, String contentType, int expectedStatus) throws Exception
protected HttpResponse post(String url, String runAsUser, String body, String queryString, String contentType, int expectedStatus) throws Exception
{
publicApiClient.setRequestContext(new RequestContext(runAsUser));
if (queryString != null)
{
url += queryString;
}
HttpResponse response = publicApiClient.post(getScope(), url, null, null, null, body, contentType);
checkStatus(expectedStatus, response.getStatusCode());
return response;
}
protected HttpResponse post(String url, String runAsUser, byte[] body, String queryString, String contentType, int expectedStatus) throws Exception
{
publicApiClient.setRequestContext(new RequestContext(runAsUser));
if (queryString != null)