diff options
author | Chris Poultney <poultney@google.com> | 2023-10-19 17:26:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2023-10-19 17:26:56 +0000 |
commit | 0421eb5e2d7d63e0fd374a5675b75f735d8399a5 (patch) | |
tree | d801d67e980805442bb11e0409c68a6a9355b77f /tests | |
parent | a33ae479bf4cf29c570bd5eafafbf7cd7a80d09b (diff) | |
parent | 953c3eeb6a989f8e8a4e145012992b8449143eef (diff) | |
download | ThemePicker-0421eb5e2d7d63e0fd374a5675b75f735d8399a5.tar.gz |
Merge changes from topic "blackflash-main" into main
* changes:
Reuse ClockViewFactory
Cache affordances and selection picker side
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 = { |