Loading packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ import com.android.systemui.common.shared.model.Icon import com.android.systemui.common.shared.model.Text import com.android.systemui.coroutines.collectLastValue import com.android.systemui.haptics.slider.sliderHapticsViewModelFactory import com.android.systemui.kosmos.brightnessWarningToast import com.android.systemui.kosmos.testScope import com.android.systemui.lifecycle.activateIn import com.android.systemui.res.R import com.android.systemui.settings.brightness.domain.interactor.brightnessMirrorShowingInteractor import com.android.systemui.settings.brightness.ui.brightnessWarningToast import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi Loading packages/SystemUI/tests/utils/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelKosmos.kt +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import com.android.systemui.brightness.domain.interactor.screenBrightnessInterac import com.android.systemui.haptics.slider.sliderHapticsViewModelFactory import com.android.systemui.kosmos.Kosmos import com.android.systemui.settings.brightness.domain.interactor.brightnessMirrorShowingInteractor import com.android.systemui.kosmos.brightnessWarningToast import com.android.systemui.settings.brightness.ui.brightnessWarningToast val Kosmos.brightnessSliderViewModelFactory: BrightnessSliderViewModel.Factory by Kosmos.Fixture { Loading packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt +0 −6 Original line number Diff line number Diff line Loading @@ -3,9 +3,6 @@ package com.android.systemui.kosmos import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.settings.brightness.ui.BrightnessWarningToast import com.android.systemui.util.mockito.mock import kotlin.coroutines.CoroutineContext import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.test.StandardTestDispatcher Loading Loading @@ -41,9 +38,6 @@ var Kosmos.backgroundCoroutineContext: CoroutineContext by Fixture { testScope.backgroundScope.coroutineContext } var Kosmos.mainCoroutineContext: CoroutineContext by Fixture { testScope.coroutineContext } var Kosmos.brightnessWarningToast: BrightnessWarningToast by Kosmos.Fixture { mock<BrightnessWarningToast>() } /** * Run this test body with a [Kosmos] as receiver, and using the [testScope] currently installed in Loading packages/SystemUI/tests/utils/src/com/android/systemui/settings/BrightnessSliderControllerKosmos.kt +1 −1 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import com.android.systemui.classifier.falsingManager import com.android.systemui.haptics.msdl.msdlPlayer import com.android.systemui.haptics.vibratorHelper import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.brightnessWarningToast import com.android.systemui.plugins.activityStarter import com.android.systemui.settings.brightness.BrightnessSliderController import com.android.systemui.settings.brightness.ui.brightnessWarningToast import com.android.systemui.util.time.systemClock /** This factory creates empty mocks. */ Loading packages/SystemUI/tests/utils/src/com/android/systemui/settings/brightness/ui/BrightnessWarningToastKosmos.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.settings.brightness.ui import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock var Kosmos.brightnessWarningToast: BrightnessWarningToast by Kosmos.Fixture { mock<BrightnessWarningToast>() } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -30,11 +30,11 @@ import com.android.systemui.common.shared.model.Icon import com.android.systemui.common.shared.model.Text import com.android.systemui.coroutines.collectLastValue import com.android.systemui.haptics.slider.sliderHapticsViewModelFactory import com.android.systemui.kosmos.brightnessWarningToast import com.android.systemui.kosmos.testScope import com.android.systemui.lifecycle.activateIn import com.android.systemui.res.R import com.android.systemui.settings.brightness.domain.interactor.brightnessMirrorShowingInteractor import com.android.systemui.settings.brightness.ui.brightnessWarningToast import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi Loading
packages/SystemUI/tests/utils/src/com/android/systemui/brightness/ui/viewmodel/BrightnessSliderViewModelKosmos.kt +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ import com.android.systemui.brightness.domain.interactor.screenBrightnessInterac import com.android.systemui.haptics.slider.sliderHapticsViewModelFactory import com.android.systemui.kosmos.Kosmos import com.android.systemui.settings.brightness.domain.interactor.brightnessMirrorShowingInteractor import com.android.systemui.kosmos.brightnessWarningToast import com.android.systemui.settings.brightness.ui.brightnessWarningToast val Kosmos.brightnessSliderViewModelFactory: BrightnessSliderViewModel.Factory by Kosmos.Fixture { Loading
packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/GeneralKosmos.kt +0 −6 Original line number Diff line number Diff line Loading @@ -3,9 +3,6 @@ package com.android.systemui.kosmos import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.settings.brightness.ui.BrightnessWarningToast import com.android.systemui.util.mockito.mock import kotlin.coroutines.CoroutineContext import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.test.StandardTestDispatcher Loading Loading @@ -41,9 +38,6 @@ var Kosmos.backgroundCoroutineContext: CoroutineContext by Fixture { testScope.backgroundScope.coroutineContext } var Kosmos.mainCoroutineContext: CoroutineContext by Fixture { testScope.coroutineContext } var Kosmos.brightnessWarningToast: BrightnessWarningToast by Kosmos.Fixture { mock<BrightnessWarningToast>() } /** * Run this test body with a [Kosmos] as receiver, and using the [testScope] currently installed in Loading
packages/SystemUI/tests/utils/src/com/android/systemui/settings/BrightnessSliderControllerKosmos.kt +1 −1 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import com.android.systemui.classifier.falsingManager import com.android.systemui.haptics.msdl.msdlPlayer import com.android.systemui.haptics.vibratorHelper import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.brightnessWarningToast import com.android.systemui.plugins.activityStarter import com.android.systemui.settings.brightness.BrightnessSliderController import com.android.systemui.settings.brightness.ui.brightnessWarningToast import com.android.systemui.util.time.systemClock /** This factory creates empty mocks. */ Loading
packages/SystemUI/tests/utils/src/com/android/systemui/settings/brightness/ui/BrightnessWarningToastKosmos.kt 0 → 100644 +23 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.settings.brightness.ui import com.android.systemui.kosmos.Kosmos import com.android.systemui.util.mockito.mock var Kosmos.brightnessWarningToast: BrightnessWarningToast by Kosmos.Fixture { mock<BrightnessWarningToast>() }