commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1167669 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/compare/ComparableComparatorTest.java
Date Sun, 11 Sep 2011 05:06:14 GMT
Author: bayard
Date: Sun Sep 11 05:06:14 2011
New Revision: 1167669

URL: http://svn.apache.org/viewvc?rev=1167669&view=rev
Log:
Adding test for equals

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/compare/ComparableComparatorTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/compare/ComparableComparatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/compare/ComparableComparatorTest.java?rev=1167669&r1=1167668&r2=1167669&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/compare/ComparableComparatorTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/compare/ComparableComparatorTest.java
Sun Sep 11 05:06:14 2011
@@ -50,4 +50,10 @@ public class ComparableComparatorTest {
                                                     cc.compare(new File("dir/file"), new
File("dir/file2")) );
     }
 
+    public void testEquals() {
+        assertEquals( "Same instance wasn't equal", ComparableComparator.INSTANCE, ComparableComparator.INSTANCE);
+        assertEquals( "Different instance wasn't equal", ComparableComparator.INSTANCE, new
ComparableComparator());
+        assertFalse( "Null was equal", ComparableComparator.INSTANCE.equals(null) );
+    }
+
 }



Mime
View raw message