Loading packages/SystemUI/tests/src/com/android/systemui/retail/data/repository/RetailModeSettingsRepositoryTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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() Loading @@ -60,6 +62,7 @@ class RetailModeSettingsRepositoryTest : SysuiTestCase() { fun retailMode_false() = testScope.runTest { val value by collectLastValue(underTest.retailMode) runCurrent() globalSettings.putInt(SETTING, 0) Loading @@ -71,6 +74,7 @@ class RetailModeSettingsRepositoryTest : SysuiTestCase() { fun retailMode_true() = testScope.runTest { val value by collectLastValue(underTest.retailMode) runCurrent() globalSettings.putInt(SETTING, 1) Loading Loading
packages/SystemUI/tests/src/com/android/systemui/retail/data/repository/RetailModeSettingsRepositoryTest.kt +4 −0 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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() Loading @@ -60,6 +62,7 @@ class RetailModeSettingsRepositoryTest : SysuiTestCase() { fun retailMode_false() = testScope.runTest { val value by collectLastValue(underTest.retailMode) runCurrent() globalSettings.putInt(SETTING, 0) Loading @@ -71,6 +74,7 @@ class RetailModeSettingsRepositoryTest : SysuiTestCase() { fun retailMode_true() = testScope.runTest { val value by collectLastValue(underTest.retailMode) runCurrent() globalSettings.putInt(SETTING, 1) Loading