Adding test for equals
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1167669 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1db449142a
commit
dc3bef79c8
|
@ -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) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue