Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

NXP-9430: fix tests

  • Loading branch information...
commit ea707a4ec8b7c20a1ce4167cf3235f04f7f14a44 1 parent 32cefa4
@troger troger authored
View
19 nuxeo-platform-usermanager-core/src/test/java/org/nuxeo/ecm/platform/usermanager/TestUserManager.java
@@ -19,6 +19,13 @@
package org.nuxeo.ecm.platform.usermanager;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
@@ -26,12 +33,10 @@
import java.util.List;
import java.util.Map;
-import org.junit.Before;
import org.junit.After;
-import org.junit.Test;
+import org.junit.Before;
import org.junit.Ignore;
-import static org.junit.Assert.*;
-
+import org.junit.Test;
import org.nuxeo.ecm.core.api.ClientException;
import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
@@ -477,7 +482,7 @@ public void testGetTopLevelGroups() throws Exception {
userManager.createGroup(g2);
List<String> expectedTopLevelGroups = Arrays.asList("administrators",
- "members", "test_g2");
+ "members", "powerusers", "test_g2");
List<String> topLevelGroups = userManager.getTopLevelGroups();
Collections.sort(topLevelGroups);
@@ -486,7 +491,7 @@ public void testGetTopLevelGroups() throws Exception {
// delete test_g2 and test if test_g1 is toplevel
userManager.deleteGroup(g2);
expectedTopLevelGroups = Arrays.asList("administrators", "members",
- "test_g1");
+ "powerusers", "test_g1");
topLevelGroups = userManager.getTopLevelGroups();
Collections.sort(topLevelGroups);
assertEquals(expectedTopLevelGroups, topLevelGroups);
@@ -497,7 +502,7 @@ public void testGetTopLevelGroups() throws Exception {
g2.setProperty("group", "subGroups", g2Groups);
userManager.createGroup(g2);
expectedTopLevelGroups = Arrays.asList("administrators", "members",
- "test_g2");
+ "powerusers", "test_g2");
topLevelGroups = userManager.getTopLevelGroups();
Collections.sort(topLevelGroups);
assertEquals(expectedTopLevelGroups, topLevelGroups);
View
4 ...-usermanager-core/src/test/java/org/nuxeo/ecm/platform/usermanager/providers/TestGroupsPageProvider.java
@@ -86,7 +86,7 @@ public void testGroupsPageProviderAllMode() throws ClientException {
PROVIDER_NAME, null, null, null, properties, "");
List<DocumentModel> groups = groupsProvider.getCurrentPage();
assertNotNull(groups);
- assertEquals(4, groups.size());
+ assertEquals(5, groups.size());
DocumentModel group = groups.get(0);
assertEquals("administrators", group.getId());
@@ -96,6 +96,8 @@ public void testGroupsPageProviderAllMode() throws ClientException {
assertEquals("group2", group.getId());
group = groups.get(3);
assertEquals("members", group.getId());
+ group = groups.get(4);
+ assertEquals("powerusers", group.getId());
}
@Test
Please sign in to comment.
Something went wrong with that request. Please try again.