gerrit-server: Move declarations of ExpectedException to base class
Introduce another base class GerritBaseTests that declares an instance of ExpectedException. Update all classes that currently declare their own ExpectedException to derive from the new base class instead. Change-Id: I6c6b53ddecbdb93906757956708480bb018fcbdb
This commit is contained in:
@@ -24,9 +24,9 @@ import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import org.junit.Rule;
|
||||
import com.google.gerrit.testutil.GerritBaseTests;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
|
||||
import java.net.Inet4Address;
|
||||
import java.net.Inet6Address;
|
||||
@@ -34,10 +34,7 @@ import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public class SocketUtilTest {
|
||||
@Rule
|
||||
public ExpectedException exception = ExpectedException.none();
|
||||
|
||||
public class SocketUtilTest extends GerritBaseTests {
|
||||
@Test
|
||||
public void testIsIPv6() throws UnknownHostException {
|
||||
final InetAddress ipv6 = getByName("1:2:3:4:5:6:7:8");
|
||||
|
||||
Reference in New Issue
Block a user