diff options
author | Santiago Etchebehere <santie@google.com> | 2023-10-19 07:29:07 -0700 |
---|---|---|
committer | Chris Poultney <poultney@google.com> | 2023-10-19 16:19:48 +0000 |
commit | 4dcfb0d5f0409a33445243ae963b1ff514b89427 (patch) | |
tree | 46d86087e2d8cafe585743ccf8329bbd041d8a21 /tests | |
parent | 80262ef74f9a481b2fba73b725a3fea56c226de2 (diff) | |
download | ThemePicker-4dcfb0d5f0409a33445243ae963b1ff514b89427.tar.gz |
Cache affordances and selection picker side
Bug: 302425391
Test: manually verified that quick affordances work as expected
Change-Id: I24a05119721847243afbe7e7ba326cdd328c870b
Diffstat (limited to 'tests')
3 files changed, 11 insertions, 0 deletions
diff --git a/tests/robotests/src/com/android/customization/model/picker/quickaffordance/data/repository/KeyguardQuickAffordancePickerRepositoryTest.kt b/tests/robotests/src/com/android/customization/model/picker/quickaffordance/data/repository/KeyguardQuickAffordancePickerRepositoryTest.kt index 8a5d582b..8687b301 100644 --- a/tests/robotests/src/com/android/customization/model/picker/quickaffordance/data/repository/KeyguardQuickAffordancePickerRepositoryTest.kt +++ b/tests/robotests/src/com/android/customization/model/picker/quickaffordance/data/repository/KeyguardQuickAffordancePickerRepositoryTest.kt @@ -20,6 +20,7 @@ package com.android.customization.model.picker.quickaffordance.data.repository import androidx.test.filters.SmallTest import com.android.customization.picker.quickaffordance.data.repository.KeyguardQuickAffordancePickerRepository import com.android.systemui.shared.customization.data.content.FakeCustomizationProviderClient +import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.TestScope @@ -28,6 +29,7 @@ import kotlinx.coroutines.test.resetMain import kotlinx.coroutines.test.setMain import org.junit.After import org.junit.Before +import org.junit.Test import org.junit.runner.RunWith import org.robolectric.RobolectricTestRunner @@ -51,9 +53,16 @@ class KeyguardQuickAffordancePickerRepositoryTest { underTest = KeyguardQuickAffordancePickerRepository( client = client, + scope = testScope.backgroundScope, ) } + // We need at least one test to prevent Studio errors + @Test + fun creationSucceeds() { + assertThat(underTest).isNotNull() + } + @After fun tearDown() { Dispatchers.resetMain() diff --git a/tests/robotests/src/com/android/customization/model/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractorTest.kt b/tests/robotests/src/com/android/customization/model/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractorTest.kt index 11098ec6..bf53f61f 100644 --- a/tests/robotests/src/com/android/customization/model/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractorTest.kt +++ b/tests/robotests/src/com/android/customization/model/picker/quickaffordance/domain/interactor/KeyguardQuickAffordancePickerInteractorTest.kt @@ -62,6 +62,7 @@ class KeyguardQuickAffordancePickerInteractorTest { repository = KeyguardQuickAffordancePickerRepository( client = client, + scope = testScope.backgroundScope, ), client = client, snapshotRestorer = { diff --git a/tests/robotests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt b/tests/robotests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt index a9da1c3b..32210245 100644 --- a/tests/robotests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt +++ b/tests/robotests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt @@ -89,6 +89,7 @@ class KeyguardQuickAffordancePickerViewModelTest { repository = KeyguardQuickAffordancePickerRepository( client = client, + scope = testScope.backgroundScope, ), client = client, snapshotRestorer = { |