diff options
author | Xin Li <delphij@google.com> | 2019-07-01 20:59:30 +0000 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2019-07-01 20:59:30 +0000 |
commit | 8f970ba24b7e13dd660f96256b3d9c01563c65ad (patch) | |
tree | 98909170d1b9a0bbc04c9cd19a5eaf54c93270f7 | |
parent | 8eb596b34f14c8db8f8ae895437ac5616ed9138a (diff) | |
parent | fe28bba97c0754b1fa057a55609ec86c7ccb1d24 (diff) | |
download | ims-temp_140451723.tar.gz |
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-mastertemp_140451723
Bug: 134405016
Change-Id: Iaf5d418e15a6050fdecf63b2e961729485f71888
4 files changed, 14 insertions, 11 deletions
diff --git a/rcs/presencepolling/tests/Android.bp b/rcs/presencepolling/tests/Android.bp index f86cd38..3dfc931 100644 --- a/rcs/presencepolling/tests/Android.bp +++ b/rcs/presencepolling/tests/Android.bp @@ -23,11 +23,12 @@ android_test { "android.test.runner", ], static_libs: [ - "android-support-test", + "androidx.test.rules", "mockito-target-minus-junit4", ], platform_apis: true, - instrumentation_for: "PresencePolling", + instrumentation_for: "PresencePollingTestHelper", certificate: "platform", test_suites: ["device-tests"], + } diff --git a/rcs/presencepolling/tests/AndroidManifest.xml b/rcs/presencepolling/tests/AndroidManifest.xml index e7f005e..a3b473c 100644 --- a/rcs/presencepolling/tests/AndroidManifest.xml +++ b/rcs/presencepolling/tests/AndroidManifest.xml @@ -23,13 +23,13 @@ <!-- To run all tests: - adb shell am instrument -w com.android.service.ims.presence.tests/android.support.test.runner.AndroidJUnitRunner + adb shell am instrument -w com.android.service.ims.presence.tests/androidx.test.runner.AndroidJUnitRunner To run a single class test: - adb shell am instrument -e class com.android.phone.unit.FooUnitTest -w com.android.service.ims.presence.tests/android.support.test.runner.AndroidJUnitRunner + adb shell am instrument -e class com.android.phone.unit.FooUnitTest -w com.android.service.ims.presence.tests/androidx.test.runner.AndroidJUnitRunner --> - <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner" + <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner" android:targetPackage="com.android.service.ims.presence" android:label="PresencePolling Tests" /> </manifest>
\ No newline at end of file diff --git a/rcs/presencepolling/tests/AndroidTest.xml b/rcs/presencepolling/tests/AndroidTest.xml index 95ec9ed..056dea6 100644 --- a/rcs/presencepolling/tests/AndroidTest.xml +++ b/rcs/presencepolling/tests/AndroidTest.xml @@ -26,7 +26,7 @@ <option name="test-tag" value="PresencePollingTests" /> <test class="com.android.tradefed.testtype.AndroidJUnitTest" > <option name="package" value="com.android.service.ims.presence.tests" /> - <option name="runner" value="android.support.test.runner.AndroidJUnitRunner" /> + <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" /> <option name="hidden-api-checks" value="false"/> </test> </configuration> diff --git a/rcs/presencepolling/tests/src/com/android/service/ims/presence/PollingServiceTests.java b/rcs/presencepolling/tests/src/com/android/service/ims/presence/PollingServiceTests.java index 44b1ea7..42d7114 100644 --- a/rcs/presencepolling/tests/src/com/android/service/ims/presence/PollingServiceTests.java +++ b/rcs/presencepolling/tests/src/com/android/service/ims/presence/PollingServiceTests.java @@ -16,12 +16,18 @@ package com.android.service.ims.presence; +import static junit.framework.Assert.assertEquals; + +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.verify; + import android.content.BroadcastReceiver; import android.content.IntentFilter; -import android.support.test.runner.AndroidJUnit4; import android.telephony.CarrierConfigManager; import android.test.suitebuilder.annotation.SmallTest; +import androidx.test.runner.AndroidJUnit4; + import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -29,10 +35,6 @@ import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import static junit.framework.Assert.assertEquals; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.verify; - /** * Unit Tests for PollingService. */ |