summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorHugo Arès <hugo.ares@ericsson.com>2015-09-18 14:35:46 -0400
committerHugo Arès <hugo.ares@ericsson.com>2015-09-23 09:08:01 -0400
commit79974e20cc87b10b358deeaafda899ccae4c6cc5 (patch)
tree066d2606b6d0c0fc7e0c323b127a336a875d71aa /org.eclipse.jgit.test
parentf4596284a092dd3143b4c55704258aa1c47c410b (diff)
downloadjgit-79974e20cc87b10b358deeaafda899ccae4c6cc5.tar.gz
jgit-79974e20cc87b10b358deeaafda899ccae4c6cc5.zip
Remove unneeded @SuppressWarnings("boxing")
Fix the unit tests to not do boxing by using assertEquals(int, int) instead of assertThat with a matcher. Change-Id: I5412fe2f72c8ea0227b9ff3a3352ccb555e22231 Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java
index df9e0294e8..6c6292558e 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java
@@ -44,7 +44,6 @@
package org.eclipse.jgit.lib;
import static org.hamcrest.CoreMatchers.hasItem;
-import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -62,7 +61,6 @@ import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.lib.RepositoryCache.FileKey;
import org.junit.Test;
-@SuppressWarnings("boxing")
public class RepositoryCacheTest extends RepositoryTestCase {
@Test
public void testNonBareFileKey() throws IOException {
@@ -154,7 +152,7 @@ public class RepositoryCacheTest extends RepositoryTestCase {
@Test
public void testGetRegisteredWhenEmpty() {
- assertThat(RepositoryCache.getRegisteredKeys().size(), is(0));
+ assertEquals(0, RepositoryCache.getRegisteredKeys().size());
}
@Test
@@ -163,7 +161,7 @@ public class RepositoryCacheTest extends RepositoryTestCase {
assertThat(RepositoryCache.getRegisteredKeys(),
hasItem(FileKey.exact(db.getDirectory(), db.getFS())));
- assertThat(RepositoryCache.getRegisteredKeys().size(), is(1));
+ assertEquals(1, RepositoryCache.getRegisteredKeys().size());
}
@Test
@@ -172,7 +170,7 @@ public class RepositoryCacheTest extends RepositoryTestCase {
RepositoryCache
.unregister(FileKey.exact(db.getDirectory(), db.getFS()));
- assertThat(RepositoryCache.getRegisteredKeys().size(), is(0));
+ assertEquals(0, RepositoryCache.getRegisteredKeys().size());
}
}