mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
REPO-164 / REPO-1086 - V1 REST API: Lock Node
- review suggestions - added more test cases + utility methods git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129751 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -45,7 +45,6 @@ import org.alfresco.rest.api.tests.client.PublicApiClient;
|
||||
import org.alfresco.rest.api.tests.client.PublicApiHttpClient.BinaryPayload;
|
||||
import org.alfresco.rest.api.tests.client.PublicApiHttpClient.RequestBuilder;
|
||||
import org.alfresco.rest.api.tests.client.RequestContext;
|
||||
import org.alfresco.rest.api.tests.client.data.Company;
|
||||
import org.alfresco.rest.api.tests.client.data.ContentInfo;
|
||||
import org.alfresco.rest.api.tests.client.data.Document;
|
||||
import org.alfresco.rest.api.tests.client.data.Folder;
|
||||
@@ -790,13 +789,13 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
|
||||
protected Document lock(String nodeId, String body) throws Exception
|
||||
{
|
||||
HttpResponse response = post("nodes/" + nodeId + "/lock", body, null, 200);
|
||||
HttpResponse response = post(getNodeOperationUrl(nodeId, "lock"), body, null, 200);
|
||||
return RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
||||
}
|
||||
|
||||
protected Document unlock(String nodeId, String body) throws Exception
|
||||
{
|
||||
HttpResponse response = post("nodes/" + nodeId + "/unlock", body, null, 200);
|
||||
HttpResponse response = post(getNodeOperationUrl(nodeId, "unlock"), body, null, 200);
|
||||
return RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
||||
}
|
||||
|
||||
@@ -872,5 +871,10 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
{
|
||||
return URL_NODES + "/" + nodeId + "/" + URL_CONTENT;
|
||||
}
|
||||
|
||||
protected String getNodeOperationUrl(String nodeId, String operation)
|
||||
{
|
||||
return URL_NODES + "/" + nodeId + "/" + operation;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user