]> source.dussan.org Git - jgit.git/commitdiff
SmartClientSmartServerTest: Stop using deprecated Repository#hasObject 95/135395/1
authorDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 20 Jan 2019 06:04:53 +0000 (15:04 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 20 Jan 2019 06:04:53 +0000 (15:04 +0900)
Change-Id: I75d1105934aeaac89476603e15cf642a65a3acbe
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java

index ecab61eeb52c81d70f986e8cf31e163dd15adf82..83083f8a4eb31a0edc5ffa9734c28241df06b5ac 100644 (file)
@@ -487,20 +487,20 @@ public class SmartClientSmartServerTest extends HttpTestCase {
        @Test
        public void testFetchBySHA1() throws Exception {
                Repository dst = createBareRepository();
-               assertFalse(dst.hasObject(A_txt));
+               assertFalse(dst.getObjectDatabase().has(A_txt));
 
                try (Transport t = Transport.open(dst, remoteURI)) {
                        t.fetch(NullProgressMonitor.INSTANCE,
                                        Collections.singletonList(new RefSpec(B.name())));
                }
 
-               assertTrue(dst.hasObject(A_txt));
+               assertTrue(dst.getObjectDatabase().has(A_txt));
        }
 
        @Test
        public void testFetchBySHA1Unreachable() throws Exception {
                Repository dst = createBareRepository();
-               assertFalse(dst.hasObject(A_txt));
+               assertFalse(dst.getObjectDatabase().has(A_txt));
 
                try (Transport t = Transport.open(dst, remoteURI)) {
                        thrown.expect(TransportException.class);
@@ -515,7 +515,7 @@ public class SmartClientSmartServerTest extends HttpTestCase {
        public void testFetchBySHA1UnreachableByAdvertiseRefsHook()
                        throws Exception {
                Repository dst = createBareRepository();
-               assertFalse(dst.hasObject(A_txt));
+               assertFalse(dst.getObjectDatabase().has(A_txt));
 
                advertiseRefsHook = new AbstractAdvertiseRefsHook() {
                        @Override