From ce8f3258c68b23d09a165bece76df6d013d70e4f Mon Sep 17 00:00:00 2001 From: Mark Rogers Date: Wed, 23 Jul 2014 19:00:14 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud) 77354: build fix following merge from PLATFORM1 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78142 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/AllUnitTestsSuite.java | 1 - .../org/alfresco/opencmis/CMISTest.java | 73 +++++++++---------- 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/source/test-java/org/alfresco/AllUnitTestsSuite.java b/source/test-java/org/alfresco/AllUnitTestsSuite.java index 866f306838..89ef26cd46 100644 --- a/source/test-java/org/alfresco/AllUnitTestsSuite.java +++ b/source/test-java/org/alfresco/AllUnitTestsSuite.java @@ -23,7 +23,6 @@ public class AllUnitTestsSuite extends TestSuite static void unitTests(TestSuite suite) { - suite.addTestSuite(org.alfresco.cmis.PropertyFilterTest.class); suite.addTestSuite(org.alfresco.encryption.EncryptorTest.class); suite.addTestSuite(org.alfresco.encryption.KeyStoreKeyProviderTest.class); suite.addTest(new JUnit4TestAdapter(org.alfresco.filesys.config.ServerConfigurationBeanTest.class)); diff --git a/source/test-java/org/alfresco/opencmis/CMISTest.java b/source/test-java/org/alfresco/opencmis/CMISTest.java index 12ba8a2e62..d1fdc32b2d 100644 --- a/source/test-java/org/alfresco/opencmis/CMISTest.java +++ b/source/test-java/org/alfresco/opencmis/CMISTest.java @@ -2228,9 +2228,9 @@ public class CMISTest AccessControlEntryImpl ace = new AccessControlEntryImpl(); ace.setPrincipal(new AccessControlPrincipalDataImpl(testGroup)); List putPermissions = new ArrayList(); - putPermissions.add(CMISAccessControlService.CMIS_ALL_PERMISSION); - putPermissions.add(CMISAccessControlService.CMIS_READ_PERMISSION); - putPermissions.add(CMISAccessControlService.CMIS_WRITE_PERMISSION); + putPermissions.add(BasicPermissions.ALL); + putPermissions.add(BasicPermissions.READ); + putPermissions.add(BasicPermissions.WRITE); ace.setPermissions(putPermissions); ace.setDirect(true); acesList.add(ace); @@ -2266,6 +2266,38 @@ public class CMISTest AuthenticationUtil.popAuthentication(); } } + + @Test + public void dictionaryTest() + { + TenantUtil.runAsUserTenant(new TenantRunAsWork() + { + @Override + public Void doWork() throws Exception + { + M2Model customModel = M2Model.createModel( + Thread.currentThread().getContextClassLoader(). + getResourceAsStream("dictionary/dictionarydaotest_model1.xml")); + dictionaryDAO.putModel(customModel); + assertNotNull(cmisDictionaryService.findType("P:cm:dublincore")); + TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1"); + assertNotNull(td); + return null; + } + }, "user1", "tenant1"); + + TenantUtil.runAsUserTenant(new TenantRunAsWork() + { + @Override + public Void doWork() throws Exception + { + assertNotNull(cmisDictionaryService.findType("P:cm:dublincore")); + TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1"); + assertNull(td); + return null; + } + }, "user2", "tenant2"); + } /** * MNT-11304: Test that Alfresco has no default boundaries for decimals @@ -2325,37 +2357,4 @@ public class CMISTest AuthenticationUtil.popAuthentication(); } } - - @Test - public void dictionaryTest() - { - TenantUtil.runAsUserTenant(new TenantRunAsWork() - { - @Override - public Void doWork() throws Exception - { - M2Model customModel = M2Model.createModel( - Thread.currentThread().getContextClassLoader(). - getResourceAsStream("dictionary/dictionarydaotest_model1.xml")); - dictionaryDAO.putModel(customModel); - assertNotNull(cmisDictionaryService.findType("P:cm:dublincore")); - TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1"); - assertNotNull(td); - return null; - } - }, "user1", "tenant1"); - - TenantUtil.runAsUserTenant(new TenantRunAsWork() - { - @Override - public Void doWork() throws Exception - { - assertNotNull(cmisDictionaryService.findType("P:cm:dublincore")); - TypeDefinitionWrapper td = cmisDictionaryService.findType("D:daotest1:type1"); - assertNull(td); - return null; - } - }, "user2", "tenant2"); - } - -} +} \ No newline at end of file