コード例 #1
0
 public void testCompareToWithWrongTypeFirstParameterAndNullSecondParameter() {
   try {
     comparator.compare("this is some string", null); // $NON-NLS-1$
     fail("Did not catch null parameter"); // $NON-NLS-1$
   } catch (ClassCastException e) {
     // expected
   }
 }
コード例 #2
0
 public void testCompareToWithNullSecondParameter() {
   assertEquals(1, comparator.compare(path1, null));
 }
コード例 #3
0
 public void testCompareToWithNullFirstParameter() {
   assertEquals(-1, comparator.compare(null, path1));
 }
コード例 #4
0
 public void testCompareToWithSameReference() {
   assertEquals(0, comparator.compare(path1, path1));
 }
コード例 #5
0
 public void testCompareTo6() {
   assertTrue(comparator.compare(path5, path7) < 0);
   assertTrue(comparator.compare(path7, path5) > 0);
 }
コード例 #6
0
 public void testCompareTo5() {
   assertTrue(comparator.compare(path5, path6) > 0);
   assertTrue(comparator.compare(path6, path5) < 0);
 }
コード例 #7
0
 public void testCompareTo4() {
   assertTrue(comparator.compare(path1, path5) > 0);
   assertTrue(comparator.compare(path5, path1) < 0);
 }
コード例 #8
0
 public void testCompareTo3() {
   assertTrue(comparator.compare(path3, path4) > 0);
   assertTrue(comparator.compare(path4, path3) < 0);
 }
コード例 #9
0
 public void testCompareTo2() {
   assertTrue(comparator.compare(path1, path3) > 0);
   assertTrue(comparator.compare(path3, path1) < 0);
 }
コード例 #10
0
 public void testCompareTo1() {
   assertEquals(0, comparator.compare(path1, path2));
   assertEquals(0, comparator.compare(path2, path2));
 }