commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwins...@apache.org
Subject svn commit: r920236 - in /commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net: SubnetUtilsTest.java ftp/parser/UnixFTPEntryParserTest.java
Date Mon, 08 Mar 2010 09:00:18 GMT
Author: rwinston
Date: Mon Mar  8 09:00:18 2010
New Revision: 920236

URL: http://svn.apache.org/viewvc?rev=920236&view=rev
Log:
Fix failing test case

Modified:
    commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/SubnetUtilsTest.java
    commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java

Modified: commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/SubnetUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/SubnetUtilsTest.java?rev=920236&r1=920235&r2=920236&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/SubnetUtilsTest.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/SubnetUtilsTest.java
Mon Mar  8 09:00:18 2010
@@ -69,6 +69,10 @@
     	}
     }
     
+    /** 
+     * Test using the inclusiveHostCount flag, which includes
+     * the network and broadcast addresses in host counts
+     */
     public void testCidrAddresses() {
     	SubnetUtils utils = new SubnetUtils("192.168.0.1/8");
     	utils.setInclusiveHostCount(true);
@@ -219,7 +223,5 @@
     	info = utils.getInfo();
     	assertEquals("255.255.255.255",info.getNetmask());
     	assertEquals(1, info.getAddressCount());
-
-
     }
 }

Modified: commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java?rev=920236&r1=920235&r2=920236&view=diff
==============================================================================
--- commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
(original)
+++ commons/proper/net/branches/NET_2_0/src/test/java/org/apache/commons/net/ftp/parser/UnixFTPEntryParserTest.java
Mon Mar  8 09:00:18 2010
@@ -216,7 +216,12 @@
 		cal.set(Calendar.MINUTE, 7);
 		cal.set(Calendar.SECOND, 0);
 		cal.set(Calendar.MILLISECOND, 0);
-		assertEquals(cal.getTime(), f.getTimestamp().getTime());
+		
+		assertEquals(f.getTimestamp().get(Calendar.MONTH), cal.get(Calendar.MONTH));
+		assertEquals(f.getTimestamp().get(Calendar.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH));
+		assertEquals(f.getTimestamp().get(Calendar.HOUR_OF_DAY), cal.get(Calendar.HOUR_OF_DAY));
+		assertEquals(f.getTimestamp().get(Calendar.MINUTE), cal.get(Calendar.MINUTE));
+		assertEquals(f.getTimestamp().get(Calendar.SECOND), cal.get(Calendar.SECOND));
 	}
 	
 	public void testFilenamesWithEmbeddedNumbers() {



Mime
View raw message