You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by md...@apache.org on 2012/10/22 18:05:11 UTC

svn commit: r1400932 - in /incubator/syncope/trunk: ./ core/src/test/java/org/apache/syncope/core/persistence/dao/ core/src/test/resources/

Author: mdisabatino
Date: Mon Oct 22 16:05:11 2012
New Revision: 1400932

URL: http://svn.apache.org/viewvc?rev=1400932&view=rev
Log:
Merge from 1_0_X

Modified:
    incubator/syncope/trunk/   (props changed)
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/EntitlementTest.java
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserSearchTest.java
    incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserTest.java
    incubator/syncope/trunk/core/src/test/resources/content.xml

Propchange: incubator/syncope/trunk/
------------------------------------------------------------------------------
  Merged /incubator/syncope/branches/1_0_X:r1400035-1400925

Modified: incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/EntitlementTest.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/EntitlementTest.java?rev=1400932&r1=1400931&r2=1400932&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/EntitlementTest.java (original)
+++ incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/EntitlementTest.java Mon Oct 22 16:05:11 2012
@@ -43,7 +43,7 @@ public class EntitlementTest extends Abs
     public void findAll() {
         List<Entitlement> list = entitlementDAO.findAll();
         // 69 real entitlements + 9 role entitlements
-        assertEquals("did not get expected number of entitlements ", 82, list.size());
+        assertEquals("did not get expected number of entitlements ", 83, list.size());
     }
 
     @Test

Modified: incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserSearchTest.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserSearchTest.java?rev=1400932&r1=1400931&r2=1400932&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserSearchTest.java (original)
+++ incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserSearchTest.java Mon Oct 22 16:05:11 2012
@@ -180,7 +180,7 @@ public class UserSearchTest {
         users = searchDAO.search(
                 EntitlementUtil.getRoleIds(entitlementDAO.findAll()), NodeCond.getNotLeafCond(membershipCond));
         assertNotNull(users);
-        assertEquals(4, users.size());
+        assertEquals(5, users.size());
     }
 
     @Test
@@ -191,7 +191,7 @@ public class UserSearchTest {
         List<SyncopeUser> users = searchDAO.search(
                 EntitlementUtil.getRoleIds(entitlementDAO.findAll()), NodeCond.getLeafCond(coolLeafCond));
         assertNotNull(users);
-        assertEquals(3, users.size());
+        assertEquals(4, users.size());
 
         coolLeafCond = new AttributeCond(AttributeCond.Type.ISNOTNULL);
         coolLeafCond.setSchema("cool");
@@ -289,7 +289,7 @@ public class UserSearchTest {
         matchingUsers = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()), searchCondition);
 
         assertNotNull(matchingUsers);
-        assertEquals(1, matchingUsers.size());
+        assertEquals(2, matchingUsers.size());
         assertEquals(4L, matchingUsers.iterator().next().getId().longValue());
     }
 
@@ -308,7 +308,7 @@ public class UserSearchTest {
         final List<SyncopeUser> users = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()),
                 searchCondition);
         assertNotNull(users);
-        assertEquals(1, users.size());
+        assertEquals(2, users.size());
         assertEquals(4L, users.iterator().next().getId().longValue());
     }
 
@@ -339,6 +339,6 @@ public class UserSearchTest {
         final List<SyncopeUser> users = searchDAO.search(EntitlementUtil.getRoleIds(entitlementDAO.findAll()),
                 searchCondition);
         assertNotNull(users);
-        assertEquals(4, users.size());
+        assertEquals(5, users.size());
     }
 }

Modified: incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserTest.java
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserTest.java?rev=1400932&r1=1400931&r2=1400932&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserTest.java (original)
+++ incubator/syncope/trunk/core/src/test/java/org/apache/syncope/core/persistence/dao/UserTest.java Mon Oct 22 16:05:11 2012
@@ -46,14 +46,14 @@ public class UserTest extends AbstractTe
     @Test
     public void findAll() {
         List<SyncopeUser> list = userDAO.findAll(EntitlementUtil.getRoleIds(entitlementDAO.findAll()));
-        assertEquals("did not get expected number of users ", 4, list.size());
+        assertEquals("did not get expected number of users ", 5, list.size());
     }
 
     @Test
     public void count() {
         Integer count = userDAO.count(EntitlementUtil.getRoleIds(entitlementDAO.findAll()));
         assertNotNull(count);
-        assertEquals(4, count.intValue());
+        assertEquals(5, count.intValue());
     }
 
     @Test
@@ -70,11 +70,11 @@ public class UserTest extends AbstractTe
 
         // get second page with uncomplete set
         list = userDAO.findAll(allRoleIds, 2, 3);
-        assertEquals("did not get expected number of users ", 1, list.size());
+        assertEquals("did not get expected number of users ", 2, list.size());
 
         // get unexistent page
         list = userDAO.findAll(allRoleIds, 3, 2);
-        assertEquals("did not get expected number of users ", 0, list.size());
+        assertEquals("did not get expected number of users ", 1, list.size());
     }
 
     @Test

Modified: incubator/syncope/trunk/core/src/test/resources/content.xml
URL: http://svn.apache.org/viewvc/incubator/syncope/trunk/core/src/test/resources/content.xml?rev=1400932&r1=1400931&r2=1400932&view=diff
==============================================================================
--- incubator/syncope/trunk/core/src/test/resources/content.xml (original)
+++ incubator/syncope/trunk/core/src/test/resources/content.xml Mon Oct 22 16:05:11 2012
@@ -670,6 +670,7 @@ under the License.
   <Entitlement name="ROLE_11"/>
   <Entitlement name="ROLE_12"/>
   <Entitlement name="ROLE_13"/>
+  <Entitlement name="ROLE_14"/>
 
   <SyncopeRole_Entitlement entitlement_name="base" role_id="1"/>
   <SyncopeRole_Entitlement entitlement_name="advanced" role_id="1"/>