summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test/tst
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-05-22 08:34:53 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2018-05-22 09:40:54 +0900
commit1da2ff7242dfc6df4d470e8519bfd8267940791a (patch)
treec344d0f11664d75afbf4cbc3440aa2cc96b19028 /org.eclipse.jgit.pgm.test/tst
parent4132dc5858f2326d25d6b5c740f62855d3f39554 (diff)
downloadjgit-1da2ff7242dfc6df4d470e8519bfd8267940791a.tar.gz
jgit-1da2ff7242dfc6df4d470e8519bfd8267940791a.zip
Repository: Deprecate getTags method
Callers should use getRefDatabase().getRefsByPrefix(R_TAGS) instead. Adjust the tests accordingly. Bug: 534731 Change-Id: Ib28ae365e42720268996ff46e34cae1745ad545c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java
index 03391a0fb6..d38a41dcb8 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/TagTest.java
@@ -43,10 +43,11 @@
package org.eclipse.jgit.pgm;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.CLIRepositoryTestCase;
-import org.eclipse.jgit.lib.Ref;
import org.junit.Before;
import org.junit.Test;
@@ -75,13 +76,9 @@ public class TagTest extends CLIRepositoryTestCase {
@Test
public void testTagDelete() throws Exception {
git.tag().setName("test").call();
-
- Ref ref = git.getRepository().getTags().get("test");
- assertEquals("refs/tags/test", ref.getName());
-
+ assertNotNull(git.getRepository().exactRef("refs/tags/test"));
assertEquals("", executeUnchecked("git tag -d test")[0]);
- Ref deletedRef = git.getRepository().getTags().get("test");
- assertEquals(null, deletedRef);
+ assertNull(git.getRepository().exactRef("refs/tags/test"));
}
@Test