diff options
| author | 2024-02-22 05:36:57 +0000 | |
|---|---|---|
| committer | 2024-02-22 15:08:23 +0000 | |
| commit | 1fa05b294c97f8ac0f91adc04bdf3d05d587c4eb (patch) | |
| tree | 92e28eecf073d0b634f1393e811a1f42f2534333 | |
| parent | 4f7007cfcf87b54d853ea8a446d8400ce02d5cb5 (diff) | |
Updated the test to cover the test case with flags enabled
Bug: 322506838
Test: Manual test
Flag: NA
Change-Id: I601c21fa3b80860474072c6c9c71424819e05763
| -rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualLocationsServiceTest.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualLocationsServiceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualLocationsServiceTest.kt index 8c5df6efef33..d2387e83e3eb 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualLocationsServiceTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualLocationsServiceTest.kt @@ -12,6 +12,7 @@ import com.android.systemui.flags.FakeFeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat +import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.test.StandardTestDispatcher @@ -38,6 +39,7 @@ class WalletContextualLocationsServiceTest : SysuiTestCase() { private var featureFlags = FakeFeatureFlags() private lateinit var underTest: WalletContextualLocationsService private lateinit var testScope: TestScope + private lateinit var testDispatcher: CoroutineDispatcher private var listenerRegisteredCount: Int = 0 private val listener: IWalletCardsUpdatedListener.Stub = object : IWalletCardsUpdatedListener.Stub() { @@ -54,8 +56,8 @@ class WalletContextualLocationsServiceTest : SysuiTestCase() { doNothing().whenever(controller).setSuggestionCardIds(anySet()) if (Looper.myLooper() == null) Looper.prepare() - val testDispatcher = StandardTestDispatcher() - testScope = TestScope() + testDispatcher = StandardTestDispatcher() + testScope = TestScope(testDispatcher) featureFlags.set(Flags.ENABLE_WALLET_CONTEXTUAL_LOYALTY_CARDS, true) listenerRegisteredCount = 0 underTest = |