Package org.exoplatform.services.organization.idm

Examples of org.exoplatform.services.organization.idm.UserDAOImpl


   public void testUniqueAttribute() throws Exception
   {
      if (userHandler_ instanceof UserDAOImpl)
      {
         UserDAOImpl ud = (UserDAOImpl)userHandler_;

         User user = userHandler_.createUserInstance("toto");
         user.setEmail("toto@gatein.org");
         userHandler_.createUser(user, true);

         user = userHandler_.createUserInstance("lolo");
         user.setEmail("lolo@gatein.org");
         userHandler_.createUser(user, true);

         // Find by unique attribute
         assertNull(ud.findUserByEmail("foobar"));
         user = ud.findUserByEmail("toto@gatein.org");
         assertNotNull(user);
         assertEquals("toto", user.getUserName());

         user = ud.findUserByEmail("lolo@gatein.org");
         assertNotNull(user);
         assertEquals("lolo", user.getUserName());

         ud.removeUser("toto", false);
         ud.removeUser("lolo", false);

      }
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.organization.idm.UserDAOImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.