diff options
author | Arne Schwabe <arne@rfc2549.org> | 2020-05-19 00:22:57 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2020-05-19 00:22:57 +0200 |
commit | 45d8e94d3b8421018fa86a8ca1439210fedbd8de (patch) | |
tree | be7a75b353aeb26f5179c9df201028e630884282 /main | |
parent | 47ecc7c36a6a606965073c22a101e2b4695a53f3 (diff) |
Update test dependencies
Diffstat (limited to 'main')
-rw-r--r-- | main/build.gradle.kts | 4 | ||||
-rw-r--r-- | main/src/test/java/de/blinkt/openvpn/core/TestConfigGenerator.java | 4 | ||||
-rw-r--r-- | main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/main/build.gradle.kts b/main/build.gradle.kts index 7c4fa61a..d95661e1 100644 --- a/main/build.gradle.kts +++ b/main/build.gradle.kts @@ -29,7 +29,8 @@ android { } } - //testOptions.unitTests.isIncludeAndroidResources = true + testOptions.unitTests.isIncludeAndroidResources = true + externalNativeBuild { @@ -187,4 +188,5 @@ dependencies { testImplementation("junit:junit:4.13") testImplementation("org.mockito:mockito-core:3.3.3") testImplementation("org.robolectric:robolectric:4.3.1") + testImplementation("androidx.test:core:1.2.0") } diff --git a/main/src/test/java/de/blinkt/openvpn/core/TestConfigGenerator.java b/main/src/test/java/de/blinkt/openvpn/core/TestConfigGenerator.java index 8a028218..91e90f86 100644 --- a/main/src/test/java/de/blinkt/openvpn/core/TestConfigGenerator.java +++ b/main/src/test/java/de/blinkt/openvpn/core/TestConfigGenerator.java @@ -7,6 +7,7 @@ package de.blinkt.openvpn.core; import android.content.Context; import android.content.pm.PackageManager; +import android.os.Build; import junit.framework.Assert; @@ -25,7 +26,8 @@ import static de.blinkt.openvpn.VpnProfile.TYPE_USERPASS; * Created by arne on 14.03.18. */ -@Config(manifest= Config.NONE) + +@Config(sdk = Build.VERSION_CODES.O_MR1) @RunWith(RobolectricTestRunner.class) public class TestConfigGenerator { @Test diff --git a/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt b/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt index da887a0b..11d7092b 100644 --- a/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt +++ b/main/src/test/java/de/blinkt/openvpn/core/TestConfigParser.kt @@ -6,6 +6,7 @@ package de.blinkt.openvpn.core import android.content.Context +import android.os.Build import androidx.test.core.app.ApplicationProvider import de.blinkt.openvpn.R import org.junit.Assert @@ -44,8 +45,8 @@ const val fakeCerts = "<ca>\n" + "</key>" -@Config(manifest = "src/main/AndroidManifest.xml") @RunWith(RobolectricTestRunner::class) +@Config(sdk = [Build.VERSION_CODES.O_MR1]) class TestConfigParser { @Test @Throws(IOException::class, ConfigParser.ConfigParseError::class) |