diff options
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java index 8ff0226183..c346d7904c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushOptionsTest.java @@ -84,7 +84,7 @@ public class PushOptionsTest extends RepositoryTestCase { private InMemoryRepository client; private ObjectId obj1; private ObjectId obj2; - private BaseReceivePack baseReceivePack; + private ReceivePack receivePack; @Before public void setUp() throws Exception { @@ -96,13 +96,12 @@ public class PushOptionsTest extends RepositoryTestCase { testProtocol = new TestProtocol<>(null, new ReceivePackFactory<Object>() { @Override - public ReceivePack create(Object req, Repository database) + public ReceivePack create(Object req, Repository git) throws ServiceNotEnabledException, ServiceNotAuthorizedException { - ReceivePack receivePack = new ReceivePack(database); + receivePack = new ReceivePack(git); receivePack.setAllowPushOptions(true); receivePack.setAtomic(true); - baseReceivePack = receivePack; return receivePack; } }); @@ -118,7 +117,6 @@ public class PushOptionsTest extends RepositoryTestCase { @After public void tearDown() { - baseReceivePack = null; Transport.unregister(testProtocol); } @@ -176,7 +174,7 @@ public class PushOptionsTest extends RepositoryTestCase { assertSame(RemoteRefUpdate.Status.OK, one.getStatus()); assertSame(RemoteRefUpdate.Status.REJECTED_REMOTE_CHANGED, two.getStatus()); - assertEquals(pushOptions, baseReceivePack.getPushOptions()); + assertEquals(pushOptions, receivePack.getPushOptions()); } @Test @@ -197,7 +195,7 @@ public class PushOptionsTest extends RepositoryTestCase { assertSame(RemoteRefUpdate.Status.OK, one.getStatus()); assertSame(RemoteRefUpdate.Status.OK, two.getStatus()); - assertEquals(pushOptions, baseReceivePack.getPushOptions()); + assertEquals(pushOptions, receivePack.getPushOptions()); } @Test @@ -220,7 +218,7 @@ public class PushOptionsTest extends RepositoryTestCase { one.getStatus()); assertSame(RemoteRefUpdate.Status.REJECTED_REMOTE_CHANGED, two.getStatus()); - assertNull(baseReceivePack.getPushOptions()); + assertNull(receivePack.getPushOptions()); } @Test @@ -241,7 +239,7 @@ public class PushOptionsTest extends RepositoryTestCase { assertSame(RemoteRefUpdate.Status.OK, one.getStatus()); assertSame(RemoteRefUpdate.Status.REJECTED_REMOTE_CHANGED, two.getStatus()); - assertEquals(pushOptions, baseReceivePack.getPushOptions()); + assertEquals(pushOptions, receivePack.getPushOptions()); } @Test @@ -360,4 +358,4 @@ public class PushOptionsTest extends RepositoryTestCase { fail("should already have thrown TransportException"); } } -}
\ No newline at end of file +} |