Merge "Fixes failing test after coroutine lib upgrade." into udc-dev-plus-aosp am: d219d85f82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24248080 Change-Id: Ifa58433e0f2012e50d1ede763a6224b566bbc1b5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -26,6 +26,7 @@ import com.google.common.truth.Truth.assertThat
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.test.StandardTestDispatcher
|
||||
import kotlinx.coroutines.test.TestScope
|
||||
import kotlinx.coroutines.test.runCurrent
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -51,6 +52,7 @@ class RetailModeSettingsRepositoryTest : SysuiTestCase() {
|
||||
fun retailMode_defaultFalse() =
|
||||
testScope.runTest {
|
||||
val value by collectLastValue(underTest.retailMode)
|
||||
runCurrent()
|
||||
|
||||
assertThat(value).isFalse()
|
||||
assertThat(underTest.inRetailMode).isFalse()
|
||||
@@ -60,6 +62,7 @@ class RetailModeSettingsRepositoryTest : SysuiTestCase() {
|
||||
fun retailMode_false() =
|
||||
testScope.runTest {
|
||||
val value by collectLastValue(underTest.retailMode)
|
||||
runCurrent()
|
||||
|
||||
globalSettings.putInt(SETTING, 0)
|
||||
|
||||
@@ -71,6 +74,7 @@ class RetailModeSettingsRepositoryTest : SysuiTestCase() {
|
||||
fun retailMode_true() =
|
||||
testScope.runTest {
|
||||
val value by collectLastValue(underTest.retailMode)
|
||||
runCurrent()
|
||||
|
||||
globalSettings.putInt(SETTING, 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user