mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merge from SEAMIST3
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10740 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -443,6 +443,18 @@ public abstract class BaseWebScriptTest extends TestCase
|
|||||||
return getHeader("Content-Type");
|
return getHeader("Content-Type");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getContentLength()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return method.getResponseBody().length;
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public String getHeader(String name)
|
public String getHeader(String name)
|
||||||
{
|
{
|
||||||
Header header = method.getResponseHeader(name);
|
Header header = method.getResponseHeader(name);
|
||||||
@@ -453,7 +465,7 @@ public abstract class BaseWebScriptTest extends TestCase
|
|||||||
{
|
{
|
||||||
return method.getStatusCode();
|
return method.getStatusCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -110,7 +110,7 @@ public class PreferenceServiceTest extends BaseWebScriptTest
|
|||||||
jsonObject.put("comp1", getPreferenceObj());
|
jsonObject.put("comp1", getPreferenceObj());
|
||||||
|
|
||||||
resp = sendRequest(new PostRequest(URL, jsonObject.toString(), "application/json"), 200);
|
resp = sendRequest(new PostRequest(URL, jsonObject.toString(), "application/json"), 200);
|
||||||
assertEquals(0, resp.getContentAsByteArray().length);
|
assertEquals(0, resp.getContentLength());
|
||||||
|
|
||||||
// Get the preferences
|
// Get the preferences
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ public class PreferenceServiceTest extends BaseWebScriptTest
|
|||||||
jsonObject.put("comp2", getPreferenceObj());
|
jsonObject.put("comp2", getPreferenceObj());
|
||||||
|
|
||||||
resp = sendRequest(new PostRequest(URL, jsonObject.toString(), "application/json"), 200);
|
resp = sendRequest(new PostRequest(URL, jsonObject.toString(), "application/json"), 200);
|
||||||
assertEquals(0, resp.getContentAsByteArray().length);
|
assertEquals(0, resp.getContentLength());
|
||||||
|
|
||||||
// Get the preferences
|
// Get the preferences
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user