commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r905687 - in /commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang: ClassUtilsTest.java SerializationUtilsTest.java time/DurationFormatUtilsTest.java
Date Tue, 02 Feb 2010 16:08:37 GMT
Author: niallp
Date: Tue Feb  2 16:08:23 2010
New Revision: 905687

URL: http://svn.apache.org/viewvc?rev=905687&view=rev
Log:
Minor test changes

Modified:
    commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/ClassUtilsTest.java
    commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/SerializationUtilsTest.java
    commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/time/DurationFormatUtilsTest.java

Modified: commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/ClassUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/ClassUtilsTest.java?rev=905687&r1=905686&r2=905687&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/ClassUtilsTest.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/ClassUtilsTest.java
Tue Feb  2 16:08:23 2010
@@ -203,8 +203,8 @@
         list.add(new Object());
         try {
             ClassUtils.convertClassNamesToClasses(list);
-            fail();
-        } catch (ClassCastException ex) {}
+            fail("Should not have been able to convert list");
+        } catch (ClassCastException expected) {}
         assertEquals(null, ClassUtils.convertClassNamesToClasses(null));
     }
     
@@ -225,8 +225,8 @@
         list.add(new Object());
         try {
             ClassUtils.convertClassesToClassNames(list);
-            fail();
-        } catch (ClassCastException ex) {}
+            fail("Should not have been able to convert list");
+        } catch (ClassCastException expected) {}
         assertEquals(null, ClassUtils.convertClassesToClassNames(null));
     }
     

Modified: commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/SerializationUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/SerializationUtilsTest.java?rev=905687&r1=905686&r2=905687&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/SerializationUtilsTest.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/SerializationUtilsTest.java
Tue Feb  2 16:08:23 2010
@@ -141,7 +141,6 @@
     }
 
     public void testSerializeStreamObjNull() throws Exception {
-        ByteArrayOutputStream streamTest = new ByteArrayOutputStream();
         try {
             SerializationUtils.serialize(iMap, null);
         } catch (IllegalArgumentException ex) {
@@ -151,7 +150,6 @@
     }
 
     public void testSerializeStreamNullNull() throws Exception {
-        ByteArrayOutputStream streamTest = new ByteArrayOutputStream();
         try {
             SerializationUtils.serialize(null, null);
         } catch (IllegalArgumentException ex) {

Modified: commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/time/DurationFormatUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/time/DurationFormatUtilsTest.java?rev=905687&r1=905686&r2=905687&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/time/DurationFormatUtilsTest.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/test/java/org/apache/commons/lang/time/DurationFormatUtilsTest.java
Tue Feb  2 16:08:23 2010
@@ -564,7 +564,7 @@
     private void assertArrayEquals(DurationFormatUtils.Token[] obj1, DurationFormatUtils.Token[]
obj2) {
         assertEquals("Arrays are unequal length. ", obj1.length, obj2.length);
         for (int i = 0; i < obj1.length; i++) {
-            assertTrue("Index " + i + " not equal, " + obj1[i] + " vs " + obj2, obj1[i].equals(obj2[i]));
+            assertTrue("Index " + i + " not equal, " + obj1[i] + " vs " + obj2[i], obj1[i].equals(obj2[i]));
         }
     }
 



Mime
View raw message