mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2)
126201 jkaabimofrad: SFS-558: Added test for the move/copy between sites. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@126636 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,8 +40,10 @@ import org.alfresco.rest.api.tests.client.data.Document;
|
||||
import org.alfresco.rest.api.tests.client.data.Folder;
|
||||
import org.alfresco.rest.api.tests.client.data.Node;
|
||||
import org.alfresco.rest.api.tests.client.data.Rendition;
|
||||
import org.alfresco.rest.api.tests.client.data.SiteRole;
|
||||
import org.alfresco.rest.api.tests.util.MultiPartBuilder;
|
||||
import org.alfresco.rest.api.tests.util.RestApiUtil;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.site.SiteVisibility;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
@@ -301,6 +303,31 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
return site;
|
||||
}
|
||||
|
||||
protected void inviteToSite(final TestSite testSite, final TestPerson invitee, final SiteRole siteRole)
|
||||
{
|
||||
TenantUtil.runAsTenant(new TenantUtil.TenantRunAsWork<Void>()
|
||||
{
|
||||
@Override
|
||||
public Void doWork() throws Exception
|
||||
{
|
||||
testSite.inviteToSite(invitee.getId(), siteRole);
|
||||
return null;
|
||||
}
|
||||
}, testSite.getNetworkId());
|
||||
}
|
||||
|
||||
protected NodeRef getSiteDocLib(final TestSite testSite)
|
||||
{
|
||||
return TenantUtil.runAsTenant(new TenantUtil.TenantRunAsWork<NodeRef>()
|
||||
{
|
||||
@Override
|
||||
public NodeRef doWork() throws Exception
|
||||
{
|
||||
return testSite.getContainerNodeRef(("documentLibrary"));
|
||||
}
|
||||
}, testSite.getNetworkId());
|
||||
}
|
||||
|
||||
protected void checkStatus(int expectedStatus, int actualStatus)
|
||||
{
|
||||
if (expectedStatus > 0 && expectedStatus != actualStatus)
|
||||
|
Reference in New Issue
Block a user