diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-09-03 22:29:44 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2012-09-03 22:37:57 +0200 |
commit | 476e1d2ff1cc1e57fe75d26f0bf679fc44325bd8 (patch) | |
tree | e29e852684fe25f0798e51f65961586eba6ffd3a /org.eclipse.jgit.test/tst/org/eclipse/jgit/lib | |
parent | 32e952fefda1d97385e92a5621324485c3886cc2 (diff) | |
download | jgit-476e1d2ff1cc1e57fe75d26f0bf679fc44325bd8.tar.gz jgit-476e1d2ff1cc1e57fe75d26f0bf679fc44325bd8.zip |
cleanup: Prefer assertEquals over assertTrue(....equals(...))
That is the common style and yields better diagnostics on failure.
Change-Id: I831a55615a812734af0912a5d6bbfd1edc75308e
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/lib')
3 files changed, 6 insertions, 6 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/AbbreviatedObjectIdTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/AbbreviatedObjectIdTest.java index fc53f95b9c..6529d9ed57 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/AbbreviatedObjectIdTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/AbbreviatedObjectIdTest.java @@ -221,8 +221,8 @@ public class AbbreviatedObjectIdTest { final AbbreviatedObjectId b = AbbreviatedObjectId.fromString(s); assertNotSame(a, b); assertTrue(a.hashCode() == b.hashCode()); - assertTrue(a.equals(b)); - assertTrue(b.equals(a)); + assertEquals(b, a); + assertEquals(a, b); } @Test @@ -232,8 +232,8 @@ public class AbbreviatedObjectIdTest { final AbbreviatedObjectId b = AbbreviatedObjectId.fromString(s); assertNotSame(a, b); assertTrue(a.hashCode() == b.hashCode()); - assertTrue(a.equals(b)); - assertTrue(b.equals(a)); + assertEquals(b, a); + assertEquals(a, b); } @Test diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java index 23647f06d7..3142995f29 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java @@ -935,7 +935,7 @@ public class DirCacheCheckoutTest extends RepositoryTestCase { } catch (CheckoutConflictException e) { assertIndex(mk("foo")); assertWorkDir(mkmap("foo", "different")); - assertTrue(getConflicts().equals(Arrays.asList("foo"))); + assertEquals(Arrays.asList("foo"), getConflicts()); assertTrue(new File(trash, "foo").isFile()); } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdTest.java index cdcb433225..abf57d6cd3 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectIdTest.java @@ -72,7 +72,7 @@ public class ObjectIdTest { final ObjectId a = ObjectId.fromString(x); final ObjectId b = ObjectId.fromString(x); assertEquals(a.hashCode(), b.hashCode()); - assertTrue("a and b are same", a.equals(b)); + assertEquals("a and b are same", b, a); } @Test |