|
|
@ -86,7 +86,6 @@ public class AbbreviatedObjectIdTest { |
|
|
|
final ObjectId f = i.toObjectId(); |
|
|
|
final ObjectId f = i.toObjectId(); |
|
|
|
assertNotNull(f); |
|
|
|
assertNotNull(f); |
|
|
|
assertEquals(ObjectId.fromString(s), f); |
|
|
|
assertEquals(ObjectId.fromString(s), f); |
|
|
|
assertEquals(f.hashCode(), i.hashCode()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -101,7 +100,6 @@ public class AbbreviatedObjectIdTest { |
|
|
|
final ObjectId f = i.toObjectId(); |
|
|
|
final ObjectId f = i.toObjectId(); |
|
|
|
assertNotNull(f); |
|
|
|
assertNotNull(f); |
|
|
|
assertEquals(ObjectId.fromString(s), f); |
|
|
|
assertEquals(ObjectId.fromString(s), f); |
|
|
|
assertEquals(f.hashCode(), i.hashCode()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -215,7 +213,7 @@ public class AbbreviatedObjectIdTest { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testEquals_Short() { |
|
|
|
public void testEquals_Short8() { |
|
|
|
final String s = "7b6e8067"; |
|
|
|
final String s = "7b6e8067"; |
|
|
|
final AbbreviatedObjectId a = AbbreviatedObjectId.fromString(s); |
|
|
|
final AbbreviatedObjectId a = AbbreviatedObjectId.fromString(s); |
|
|
|
final AbbreviatedObjectId b = AbbreviatedObjectId.fromString(s); |
|
|
|
final AbbreviatedObjectId b = AbbreviatedObjectId.fromString(s); |
|
|
@ -225,6 +223,18 @@ public class AbbreviatedObjectIdTest { |
|
|
|
assertEquals(a, b); |
|
|
|
assertEquals(a, b); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void testEquals_Short4() { |
|
|
|
|
|
|
|
final String s = "7b6e"; |
|
|
|
|
|
|
|
final AbbreviatedObjectId a = AbbreviatedObjectId.fromString(s); |
|
|
|
|
|
|
|
final AbbreviatedObjectId b = AbbreviatedObjectId.fromString(s); |
|
|
|
|
|
|
|
assertNotSame(a, b); |
|
|
|
|
|
|
|
assertTrue(a.hashCode() != 0); |
|
|
|
|
|
|
|
assertTrue(a.hashCode() == b.hashCode()); |
|
|
|
|
|
|
|
assertEquals(b, a); |
|
|
|
|
|
|
|
assertEquals(a, b); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void testEquals_Full() { |
|
|
|
public void testEquals_Full() { |
|
|
|
final String s = "7b6e8067ec96acef9a4184b43210d583b6d2f99a"; |
|
|
|
final String s = "7b6e8067ec96acef9a4184b43210d583b6d2f99a"; |
|
|
|