Package com.omnicarecr.accounts.util

Examples of com.omnicarecr.accounts.util.Passwd


   * Unit test to make sure that lookupUid works correctly   
   * give a fake password file   
   */   
  public void testLookupUidPass() {   
 
    Passwd passwd = null;   
    try
      passwd = new Passwd(PASSWD_STREAM);
    } catch (Exception e) { 
     
      fail();   
    }   
    long uid = passwd.lookupUid(USER_ID_PASS)

    assertTrue(uid == 0);   
 
View Full Code Here


    assertTrue(uid == 0);   
 
 
  public void testLookupUidFail() {   
      // passwd is a fake class for testing located in testcases dir   
      Passwd passwd = null;   
         
      try
        passwd = new Passwd(PASSWD_STREAM);
      } catch (Exception e) { 
        fail();   
      }   
      // look me up out out of that file and make sure uid is still 28272   
      long uid = passwd.lookupUid(USER_ID_FAIL)
    
      assertTrue(uid == passwd.NOT_FOUND);   
   
View Full Code Here

      assertTrue(uid == passwd.NOT_FOUND);   
   
 
  public void testLookupGidPass() {   
      // passwd is a fake class for testing located in testcases dir   
      Passwd passwd = null;   
         
      try
        passwd = new Passwd(PASSWD_STREAM);   
      } catch (Exception e) { 
        fail();   
      }   
      // look me up out out of that file and make sure uid is still 28272   
      long gid = passwd.lookupGid(USER_ID_PASS)

      assertTrue(gid == GID_PASS);   
   
View Full Code Here

      assertTrue(gid == GID_PASS);   
   
   
    public void testLookupGidFail() {   
        // passwd is a fake class for testing located in testcases dir   
        Passwd passwd = null;   
           
        try
          passwd = new Passwd(PASSWD_STREAM);   
        } catch (Exception e) { 
          fail();   
        }   
        // look me up out out of that file and make sure uid is still 28272   
        long gid = passwd.lookupGid(USER_ID_FAIL)
        assertTrue(gid == Long.valueOf(passwd.NOT_FOUND));   
     
View Full Code Here

        assertTrue(gid == Long.valueOf(passwd.NOT_FOUND));   
     
   
    public void testLookupGecosPass() {   
        // passwd is a fake class for testing located in testcases dir   
        Passwd passwd = null;   
           
        try
          passwd = new Passwd(PASSWD_STREAM);   
        } catch (Exception e) { 
          fail();   
        }   
        // look me up out out of that file and make sure uid is still 28272   
        String gecos = passwd.lookupGecos(USER_ID_PASS)

        assertEquals(gecos, GECOS_PASS);   
     
View Full Code Here

        assertEquals(gecos, GECOS_PASS);   
     
     
      public void testLookupGecosFail() {   
          // passwd is a fake class for testing located in testcases dir   
          Passwd passwd = null;   
             
          try
            passwd = new Passwd(PASSWD_STREAM);   
          } catch (Exception e) { 
            fail();   
          }   
          // look me up out out of that file and make sure uid is still 28272   
          String gecos = passwd.lookupGecos(USER_ID_FAIL)
        
          assertEquals(gecos, String.valueOf(passwd.NOT_FOUND));   
        }
View Full Code Here

          assertEquals(gecos, String.valueOf(passwd.NOT_FOUND));   
        }
     
      public void testLookupHomeDirPass() {   
          // passwd is a fake class for testing located in testcases dir   
          Passwd passwd = null;   
             
          try
            passwd = new Passwd(PASSWD_STREAM);   
          } catch (Exception e) { 
            fail();   
          }   
          // look me up out out of that file and make sure uid is still 28272   
          String homedir = passwd.lookupHomeDir(USER_ID_PASS)

          assertEquals(homedir, HOME_DIR_PASS);   
       
View Full Code Here

          assertEquals(homedir, HOME_DIR_PASS);   
       
       
        public void testLookupHomeDirFail() {   
            // passwd is a fake class for testing located in testcases dir   
            Passwd passwd = null;   
               
            try
              passwd = new Passwd(PASSWD_STREAM);   
            } catch (Exception e) { 
              fail();   
            }   
            // look me up out out of that file and make sure uid is still 28272   
            String homedir = passwd.lookupGecos(USER_ID_FAIL)
          
            assertEquals(homedir, String.valueOf(passwd.NOT_FOUND));   
         
View Full Code Here

TOP

Related Classes of com.omnicarecr.accounts.util.Passwd

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.