portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlest...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/userinfo TestUserInfoManager.java
Date Tue, 08 Jun 2004 01:35:34 GMT
dlestrat    2004/06/07 18:35:34

  Modified:    portal/src/test/org/apache/jetspeed/userinfo
                        TestUserInfoManager.java
  Log:
  Finalizing http://nagoya.apache.org/jira/browse/JS2-64
  
  Revision  Changes    Path
  1.6       +12 -2     jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/userinfo/TestUserInfoManager.java
  
  Index: TestUserInfoManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/userinfo/TestUserInfoManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestUserInfoManager.java	27 May 2004 19:57:45 -0000	1.5
  +++ TestUserInfoManager.java	8 Jun 2004 01:35:34 -0000	1.6
  @@ -42,8 +42,8 @@
   import org.apache.jetspeed.security.impl.RdbmsPolicy;
   import org.apache.jetspeed.security.impl.RoleManagerImpl;
   import org.apache.jetspeed.security.impl.SecurityProviderImpl;
  -import org.apache.jetspeed.security.impl.UserImpl;
   import org.apache.jetspeed.security.impl.UserManagerImpl;
  +import org.apache.jetspeed.tools.pamanager.JetspeedDescriptorUtilities;
   import org.apache.jetspeed.tools.pamanager.PortletDescriptorUtilities;
   import org.apache.jetspeed.userinfo.impl.UserInfoManagerImpl;
   
  @@ -136,6 +136,7 @@
   
           RequestContext request = initRequestContext("anon");
   
  +        // Without linked attributes
           // There are no preferences associated to the user profile.
           Map userInfo = uim.getUserInfoMap(app.getId(), request);
           assertNull(PortletRequest.USER_INFO + " is null", userInfo);
  @@ -148,7 +149,16 @@
           assertEquals("should contain user.name.given", "Test Dude", (String) userInfo.get("user.name.given"));
           assertEquals("should contain user.name.family", "Dudley", (String) userInfo.get("user.name.family"));
           assertNull("should not contain user.home-info.online.email", userInfo.get("user.home-info.online.email"));
  -
  +        
  +        // With linked attributes
  +        boolean isLoaded = JetspeedDescriptorUtilities.loadPortletDescriptor("./test/testdata/deploy/jetspeed-portlet.xml",
app);
  +        assertTrue("should have loaded jetspeed-portlet.xml.", isLoaded);
  +        
  +        userInfo = uim.getUserInfoMap(app.getId(), request);
  +        assertNotNull(PortletRequest.USER_INFO + " should not be null", userInfo);
  +        assertEquals("should contain user-name-given", "Test Dude", (String) userInfo.get("user-name-given"));
  +        assertEquals("should contain user-name-family", "Dudley", (String) userInfo.get("user-name-family"));
  +         
           // remove the app
           try
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message