Make JUint test not inherit from TestCase
Change-Id: Ic627b67c1e9c0830708dba475c911e0c478887aa
diff --git a/src/test/java/com/googlesource/gerrit/plugins/replication/GitUpdateProcessingTest.java b/src/test/java/com/googlesource/gerrit/plugins/replication/GitUpdateProcessingTest.java
index 4cbac3a..21ee4b5 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/replication/GitUpdateProcessingTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/replication/GitUpdateProcessingTest.java
@@ -32,15 +32,15 @@
import com.googlesource.gerrit.plugins.replication.PushResultProcessing.GitUpdateProcessing;
import com.googlesource.gerrit.plugins.replication.ReplicationState.RefPushResult;
-import junit.framework.TestCase;
-
import org.eclipse.jgit.transport.RemoteRefUpdate;
import org.eclipse.jgit.transport.URIish;
+import org.junit.Before;
+import org.junit.Test;
import java.net.URISyntaxException;
@SuppressWarnings("unchecked")
-public class GitUpdateProcessingTest extends TestCase {
+public class GitUpdateProcessingTest {
static {
KeyUtil.setEncoderImpl(new StandardKeyEncoder());
}
@@ -48,9 +48,8 @@
private EventDispatcher dispatcherMock;
private GitUpdateProcessing gitUpdateProcessing;
- @Override
- protected void setUp() throws Exception {
- super.setUp();
+ @Before
+ public void setUp() throws Exception {
dispatcherMock = createMock(EventDispatcher.class);
replay(dispatcherMock);
ReviewDb reviewDbMock = createNiceMock(ReviewDb.class);
@@ -61,6 +60,7 @@
gitUpdateProcessing = new GitUpdateProcessing(dispatcherMock);
}
+ @Test
public void testHeadRefReplicated() throws URISyntaxException, OrmException {
reset(dispatcherMock);
RefReplicatedEvent expectedEvent =
@@ -76,6 +76,7 @@
verify(dispatcherMock);
}
+ @Test
public void testChangeRefReplicated() throws URISyntaxException, OrmException {
reset(dispatcherMock);
RefReplicatedEvent expectedEvent =
@@ -91,6 +92,7 @@
verify(dispatcherMock);
}
+ @Test
public void testOnAllNodesReplicated() throws OrmException {
reset(dispatcherMock);
RefReplicationDoneEvent expectedDoneEvent =