Realign AuthorityServiceTest with the new definition of 'root group in zone'

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15055 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-07-01 16:57:57 +00:00
parent 57cd1bfd94
commit 4fed6c95ee

View File

@@ -234,17 +234,15 @@ public class AuthorityServiceTest extends TestCase
assertEquals(2, pubAuthorityService.getAllRootAuthoritiesInZone("Two", AuthorityType.GROUP).size()); assertEquals(2, pubAuthorityService.getAllRootAuthoritiesInZone("Two", AuthorityType.GROUP).size());
assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("Three", AuthorityType.GROUP).size()); assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("Three", AuthorityType.GROUP).size());
// I am not convinced of the definition of root within zone ...
pubAuthorityService.addAuthority("GROUP_1", "GROUP_2"); pubAuthorityService.addAuthority("GROUP_1", "GROUP_2");
pubAuthorityService.addAuthority("GROUP_1", "GROUP_3"); pubAuthorityService.addAuthority("GROUP_1", "GROUP_3");
assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("One", null).size()); assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("One", null).size());
assertEquals(0, pubAuthorityService.getAllRootAuthoritiesInZone("Two", null).size()); assertEquals(2, pubAuthorityService.getAllRootAuthoritiesInZone("Two", null).size());
assertEquals(0, pubAuthorityService.getAllRootAuthoritiesInZone("Three", null).size()); assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("Three", null).size());
assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("One", AuthorityType.GROUP).size()); assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("One", AuthorityType.GROUP).size());
assertEquals(0, pubAuthorityService.getAllRootAuthoritiesInZone("Two", AuthorityType.GROUP).size()); assertEquals(2, pubAuthorityService.getAllRootAuthoritiesInZone("Two", AuthorityType.GROUP).size());
assertEquals(0, pubAuthorityService.getAllRootAuthoritiesInZone("Three", AuthorityType.GROUP).size()); assertEquals(1, pubAuthorityService.getAllRootAuthoritiesInZone("Three", AuthorityType.GROUP).size());
} }
public void testGroupWildcards() public void testGroupWildcards()