Loading tests/common/src/com/android/customization/testing/TestCustomizationInjector.kt +7 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,9 @@ import com.android.wallpaper.network.Requester import com.android.wallpaper.picker.category.wrapper.WallpaperCategoryWrapper import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor import com.android.wallpaper.testing.FakeCurrentWallpaperInfoFactory import com.android.wallpaper.testing.FakeWallpaperClient import com.android.wallpaper.testing.FakeWallpaperRefresher import com.android.wallpaper.testing.TestInjector import com.android.wallpaper.testing.TestPackageStatusNotifier import com.android.wallpaper.util.DisplayUtils Loading @@ -43,7 +45,9 @@ constructor( injectedWallpaperInteractor: WallpaperInteractor, prefs: WallpaperPreferences, private val fakeWallpaperCategoryWrapper: WallpaperCategoryWrapper, private val testStatusNotifier: TestPackageStatusNotifier, testStatusNotifier: TestPackageStatusNotifier, currentWallpaperInfoFactory: FakeCurrentWallpaperInfoFactory, wallpaperRefresher: FakeWallpaperRefresher, ) : TestInjector( themesUserEventLogger, Loading @@ -56,6 +60,8 @@ constructor( prefs, fakeWallpaperCategoryWrapper, testStatusNotifier, currentWallpaperInfoFactory, wallpaperRefresher, ), CustomizationInjector { ///////////////// Loading tests/robotests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt +10 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import com.android.themepicker.R import com.android.wallpaper.module.InjectorProvider import com.android.wallpaper.module.NetworkStatusNotifier import com.android.wallpaper.module.PartnerProvider import com.android.wallpaper.module.WallpaperPreferences import com.android.wallpaper.network.Requester import com.android.wallpaper.picker.category.wrapper.WallpaperCategoryWrapper import com.android.wallpaper.picker.common.icon.ui.viewmodel.Icon Loading @@ -43,8 +42,9 @@ import com.android.wallpaper.picker.common.text.ui.viewmodel.Text import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor import com.android.wallpaper.picker.option.ui.viewmodel.OptionItemViewModel import com.android.wallpaper.testing.FakeCurrentWallpaperInfoFactory import com.android.wallpaper.testing.FakeWallpaperClient import com.android.wallpaper.testing.TestCurrentWallpaperInfoFactory import com.android.wallpaper.testing.FakeWallpaperRefresher import com.android.wallpaper.testing.TestInjector import com.android.wallpaper.testing.TestPackageStatusNotifier import com.android.wallpaper.testing.TestWallpaperPreferences Loading Loading @@ -90,6 +90,9 @@ class KeyguardQuickAffordancePickerViewModelTest { testScope = TestScope(testDispatcher) Dispatchers.setMain(testDispatcher) client = FakeCustomizationProviderClient() val prefs = TestWallpaperPreferences() val refresher = FakeWallpaperRefresher(prefs) val wallpaperInfoFactory = FakeCurrentWallpaperInfoFactory(refresher) quickAffordanceInteractor = KeyguardQuickAffordancePickerInteractor( Loading @@ -107,7 +110,7 @@ class KeyguardQuickAffordancePickerViewModelTest { WallpaperRepository( scope = testScope.backgroundScope, client = FakeWallpaperClient(), wallpaperPreferences = TestWallpaperPreferences(), wallpaperPreferences = prefs, backgroundDispatcher = testDispatcher, ) ) Loading @@ -121,9 +124,11 @@ class KeyguardQuickAffordancePickerViewModelTest { mock(PartnerProvider::class.java), FakeWallpaperClient(), wallpaperInteractor, mock(WallpaperPreferences::class.java), prefs, mock(WallpaperCategoryWrapper::class.java), testPackageStatusNotifier, wallpaperInfoFactory, refresher, ) ) underTest = Loading @@ -131,7 +136,7 @@ class KeyguardQuickAffordancePickerViewModelTest { context = context, quickAffordanceInteractor = quickAffordanceInteractor, wallpaperInteractor = wallpaperInteractor, wallpaperInfoFactory = TestCurrentWallpaperInfoFactory(context), wallpaperInfoFactory = wallpaperInfoFactory, logger = logger, ) .create(KeyguardQuickAffordancePickerViewModel::class.java) Loading Loading
tests/common/src/com/android/customization/testing/TestCustomizationInjector.kt +7 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,9 @@ import com.android.wallpaper.network.Requester import com.android.wallpaper.picker.category.wrapper.WallpaperCategoryWrapper import com.android.wallpaper.picker.customization.data.repository.WallpaperColorsRepository import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor import com.android.wallpaper.testing.FakeCurrentWallpaperInfoFactory import com.android.wallpaper.testing.FakeWallpaperClient import com.android.wallpaper.testing.FakeWallpaperRefresher import com.android.wallpaper.testing.TestInjector import com.android.wallpaper.testing.TestPackageStatusNotifier import com.android.wallpaper.util.DisplayUtils Loading @@ -43,7 +45,9 @@ constructor( injectedWallpaperInteractor: WallpaperInteractor, prefs: WallpaperPreferences, private val fakeWallpaperCategoryWrapper: WallpaperCategoryWrapper, private val testStatusNotifier: TestPackageStatusNotifier, testStatusNotifier: TestPackageStatusNotifier, currentWallpaperInfoFactory: FakeCurrentWallpaperInfoFactory, wallpaperRefresher: FakeWallpaperRefresher, ) : TestInjector( themesUserEventLogger, Loading @@ -56,6 +60,8 @@ constructor( prefs, fakeWallpaperCategoryWrapper, testStatusNotifier, currentWallpaperInfoFactory, wallpaperRefresher, ), CustomizationInjector { ///////////////// Loading
tests/robotests/src/com/android/customization/model/picker/quickaffordance/ui/viewmodel/KeyguardQuickAffordancePickerViewModelTest.kt +10 −5 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import com.android.themepicker.R import com.android.wallpaper.module.InjectorProvider import com.android.wallpaper.module.NetworkStatusNotifier import com.android.wallpaper.module.PartnerProvider import com.android.wallpaper.module.WallpaperPreferences import com.android.wallpaper.network.Requester import com.android.wallpaper.picker.category.wrapper.WallpaperCategoryWrapper import com.android.wallpaper.picker.common.icon.ui.viewmodel.Icon Loading @@ -43,8 +42,9 @@ import com.android.wallpaper.picker.common.text.ui.viewmodel.Text import com.android.wallpaper.picker.customization.data.repository.WallpaperRepository import com.android.wallpaper.picker.customization.domain.interactor.WallpaperInteractor import com.android.wallpaper.picker.option.ui.viewmodel.OptionItemViewModel import com.android.wallpaper.testing.FakeCurrentWallpaperInfoFactory import com.android.wallpaper.testing.FakeWallpaperClient import com.android.wallpaper.testing.TestCurrentWallpaperInfoFactory import com.android.wallpaper.testing.FakeWallpaperRefresher import com.android.wallpaper.testing.TestInjector import com.android.wallpaper.testing.TestPackageStatusNotifier import com.android.wallpaper.testing.TestWallpaperPreferences Loading Loading @@ -90,6 +90,9 @@ class KeyguardQuickAffordancePickerViewModelTest { testScope = TestScope(testDispatcher) Dispatchers.setMain(testDispatcher) client = FakeCustomizationProviderClient() val prefs = TestWallpaperPreferences() val refresher = FakeWallpaperRefresher(prefs) val wallpaperInfoFactory = FakeCurrentWallpaperInfoFactory(refresher) quickAffordanceInteractor = KeyguardQuickAffordancePickerInteractor( Loading @@ -107,7 +110,7 @@ class KeyguardQuickAffordancePickerViewModelTest { WallpaperRepository( scope = testScope.backgroundScope, client = FakeWallpaperClient(), wallpaperPreferences = TestWallpaperPreferences(), wallpaperPreferences = prefs, backgroundDispatcher = testDispatcher, ) ) Loading @@ -121,9 +124,11 @@ class KeyguardQuickAffordancePickerViewModelTest { mock(PartnerProvider::class.java), FakeWallpaperClient(), wallpaperInteractor, mock(WallpaperPreferences::class.java), prefs, mock(WallpaperCategoryWrapper::class.java), testPackageStatusNotifier, wallpaperInfoFactory, refresher, ) ) underTest = Loading @@ -131,7 +136,7 @@ class KeyguardQuickAffordancePickerViewModelTest { context = context, quickAffordanceInteractor = quickAffordanceInteractor, wallpaperInteractor = wallpaperInteractor, wallpaperInfoFactory = TestCurrentWallpaperInfoFactory(context), wallpaperInfoFactory = wallpaperInfoFactory, logger = logger, ) .create(KeyguardQuickAffordancePickerViewModel::class.java) Loading