mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-2440. Ensuring that users reclassifying content see the correct set of levels.
Added a new test case where an admin and an RM Manager (only cleared to secret) both try to reclassify a record. Added a new group (GROUP_RM_MANAGER_FILE_CATEGORY_ONE) for an RM Manager who can file records as well as read. Added some utility methods and fields. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@109524 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,8 +20,13 @@
|
||||
package org.alfresco.module.org_alfresco_module_rm.util;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.Collections.emptyList;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.test.util.ExceptionUtils.expectedException;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.util.RMCollectionUtils.diffKey;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.util.RMCollectionUtils.head;
|
||||
import static org.alfresco.module.org_alfresco_module_rm.util.RMCollectionUtils.tail;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import org.alfresco.module.org_alfresco_module_rm.util.RMCollectionUtils.Difference;
|
||||
|
||||
@@ -75,4 +80,18 @@ public class RMCollectionUtilsUnitTest
|
||||
assertEquals(Difference.UNCHANGED, diffKey(mapA, mapB, -1));
|
||||
assertEquals(Difference.CHANGED, diffKey(mapA, mapB, 3));
|
||||
}
|
||||
|
||||
@Test public void tailsOfLists()
|
||||
{
|
||||
assertEquals(asList(2), tail(asList(1, 2)));
|
||||
assertEquals(emptyList(), tail(asList(1)));
|
||||
expectedException(UnsupportedOperationException.class, () -> tail(emptyList()));
|
||||
}
|
||||
|
||||
@Test public void headsOfLists()
|
||||
{
|
||||
assertEquals("a", head(asList("a", "b")));
|
||||
assertEquals("a", head(asList("a")));
|
||||
assertNull(head(emptyList()));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user