1. Use AndroidJunit4 instead of RobolectricTestRunner 2. Use ApplicationProvider instead of RuntimeEnvironment to get context Bug: 162048313 Test: atest -c MobileDataEnabledListenerTest Merged-In: I81b3d6ac075666a45649c8d811832a40bdb1b41b Change-Id: I34687eb69ef62cd3b6ea6519cee608a7b95f242b
35 lines
790 B
Plaintext
35 lines
790 B
Plaintext
android_test {
|
|
name: "SettingsUnitTests",
|
|
|
|
certificate: "platform",
|
|
|
|
libs: [
|
|
"android.test.runner",
|
|
"telephony-common",
|
|
"ims-common",
|
|
"android.test.base",
|
|
"android.test.mock",
|
|
],
|
|
|
|
static_libs: [
|
|
"androidx.test.core",
|
|
"androidx.test.rules",
|
|
"androidx.test.espresso.core",
|
|
"androidx.test.espresso.contrib-nodeps",
|
|
"androidx.test.espresso.intents-nodeps",
|
|
"androidx.test.ext.junit",
|
|
"mockito-target-minus-junit4",
|
|
"platform-test-annotations",
|
|
"truth-prebuilt",
|
|
"ub-uiautomator",
|
|
],
|
|
|
|
// Include all test java files.
|
|
srcs: ["src/**/*.java"],
|
|
|
|
platform_apis: true,
|
|
test_suites: ["device-tests"],
|
|
|
|
instrumentation_for: "Settings",
|
|
}
|