mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
12867: Part 1: JAWS-220: Fix existing tests and tests for sort 12879: JAWS-219: Part 1: First cut of support for CMIS objectid = objectid joins 12891: Complete minimalist support for Policies 12912: CMIS Query: JAWS-219: Tests, fixes and better checking 13062: Fix for ETHREEOH-1162:Issue with skipCount parameter for CMIS query service git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13224 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,6 +40,7 @@ import org.alfresco.repo.security.authentication.MutableAuthenticationDao;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.model.FileFolderService;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
@@ -95,6 +96,8 @@ public abstract class BaseCMISTest extends TestCase
|
||||
|
||||
protected SearchService searchService;
|
||||
|
||||
protected ContentService contentService;
|
||||
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
serviceRegistry = (ServiceRegistry) ctx.getBean("ServiceRegistry");
|
||||
@@ -114,6 +117,8 @@ public abstract class BaseCMISTest extends TestCase
|
||||
|
||||
searchService = (SearchService) ctx.getBean("searchService");
|
||||
|
||||
contentService = (ContentService) ctx.getBean("contentService");
|
||||
|
||||
authenticationService = (AuthenticationService) ctx.getBean("authenticationService");
|
||||
authenticationDAO = (MutableAuthenticationDao) ctx.getBean("authenticationDao");
|
||||
|
||||
@@ -121,7 +126,7 @@ public abstract class BaseCMISTest extends TestCase
|
||||
testTX.begin();
|
||||
this.authenticationComponent.setSystemUserAsCurrentUser();
|
||||
|
||||
String storeName = "CMISTest-" + getName() + "-" + (new Date().getTime());
|
||||
String storeName = "CMISTest-" + getStoreName() + "-" + (new Date().getTime());
|
||||
StoreRef storeRef = nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, storeName);
|
||||
rootNodeRef = nodeService.getRootNode(storeRef);
|
||||
|
||||
@@ -131,6 +136,15 @@ public abstract class BaseCMISTest extends TestCase
|
||||
}
|
||||
authenticationService.createAuthentication("cmis", "cmis".toCharArray());
|
||||
}
|
||||
|
||||
private String getStoreName()
|
||||
{
|
||||
String testName = getName();
|
||||
testName = testName.replace("_", "-");
|
||||
testName = testName.replace("%", "-");
|
||||
return testName;
|
||||
|
||||
}
|
||||
|
||||
protected void runAs(String userName)
|
||||
{
|
||||
|
Reference in New Issue
Block a user