You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by br...@apache.org on 2003/08/05 20:13:06 UTC

cvs commit: jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser EnterpriseUnixFTPEntryParserTest.java

brekke      2003/08/05 11:13:06

  Modified:    net/src/test/org/apache/commons/net/ftp/parser
                        EnterpriseUnixFTPEntryParserTest.java
  Log:
  Updated asserts to only check month, day, and time since the year and day of week may change.
  Not sure why this wasn't failing all year though???
  
  Revision  Changes    Path
  1.2       +8 -3      jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParserTest.java
  
  Index: EnterpriseUnixFTPEntryParserTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/net/src/test/org/apache/commons/net/ftp/parser/EnterpriseUnixFTPEntryParserTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnterpriseUnixFTPEntryParserTest.java	2 Mar 2003 18:27:41 -0000	1.1
  +++ EnterpriseUnixFTPEntryParserTest.java	5 Aug 2003 18:13:06 -0000	1.2
  @@ -55,6 +55,8 @@
    */
   
   
  +import java.util.Calendar;
  +
   import junit.framework.TestSuite;
   
   import org.apache.commons.net.ftp.FTPFile;
  @@ -144,8 +146,11 @@
                        file.getUser());
           assertEquals("18128", 
                        file.getGroup());
  -        assertEquals("Mon Aug 12 13:56:00 2002", 
  -                     df.format(file.getTimestamp().getTime()));
  +        Calendar timestamp = file.getTimestamp();
  +        assertEquals(Calendar.AUGUST, timestamp.get(Calendar.MONTH));
  +        assertEquals(12, timestamp.get(Calendar.DAY_OF_MONTH));
  +        assertEquals(13, timestamp.get(Calendar.HOUR_OF_DAY));
  +        assertEquals(56, timestamp.get(Calendar.MINUTE));         
           checkPermisions(file);
       }
   
  
  
  

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