Migrate most of core networking tests to junit4

This patch is a batch of mechanical changes to test classes to migrate
away from AndroidTestCase and TestCase.

Bug: 62918393
Test: runtest frameworks-net
Change-Id: I74134609e511f22c4d9ecd65780e981f9ba7ae3f
This commit is contained in:
Hugo Benichi
2017-10-11 11:26:25 +09:00
parent 4dea4936c7
commit 1c0f4e27bc
8 changed files with 210 additions and 127 deletions

View File

@@ -31,19 +31,21 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.system.Os;
import android.test.AndroidTestCase;
import com.android.server.IpSecService;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Unit tests for {@link IpSecManager}. */
@SmallTest
@RunWith(JUnit4.class)
@RunWith(AndroidJUnit4.class)
public class IpSecManagerTest {
private static final int TEST_UDP_ENCAP_PORT = 34567;