Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelAlwaysShowPercentTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class BatteryViewModelAlwaysShowPercentTest : SysuiTestCase() { val kosmos = testKosmos() val Kosmos.underTest by Kosmos.Fixture { batteryViewModelAlwaysShowPercent } val Kosmos.underTest by Kosmos.Fixture { batteryViewModelAlwaysShowPercentFactory.create() } @Before fun setUp() { Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelBasedOnSettingTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class BatteryViewModelBasedOnSettingTest : SysuiTestCase() { val kosmos = testKosmos() val Kosmos.underTest by Kosmos.Fixture { batteryViewModelBasedOnSetting } val Kosmos.underTest by Kosmos.Fixture { batteryViewModelBasedOnSettingFactory.create() } @Before fun setUp() { Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelShowWhenChargingTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,9 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class BatteryViewModelShowWhenChargingTest : SysuiTestCase() { val kosmos = testKosmos() val Kosmos.underTest by Kosmos.Fixture { batteryViewModelShowWhenChargingOrSetting } val Kosmos.underTest by Kosmos.Fixture { batteryViewModelShowWhenChargingOrSettingFactory.create() } @Before fun setUp() { Loading packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelKosmos.kt +15 −18 Original line number Diff line number Diff line Loading @@ -20,40 +20,37 @@ import android.content.testableContext import com.android.systemui.kosmos.Kosmos import com.android.systemui.statusbar.pipeline.battery.domain.interactor.batteryInteractor val Kosmos.batteryViewModelBasedOnSetting by Kosmos.Fixture { BatteryViewModel.BasedOnUserSetting(batteryInteractor, testableContext) } val Kosmos.batteryViewModelBasedOnSettingFactory by Kosmos.Fixture { BatteryViewModel.BasedOnUserSetting.Factory { batteryViewModelBasedOnSetting } BatteryViewModel.BasedOnUserSetting.Factory { BatteryViewModel.BasedOnUserSetting( batteryInteractor, testableContext ) } val Kosmos.batteryViewModelShowWhenChargingOrSetting by Kosmos.Fixture { BatteryViewModel.ShowPercentWhenChargingOrSetting(batteryInteractor, testableContext) } val Kosmos.batteryViewModelShowWhenChargingOrSettingFactory by Kosmos.Fixture { BatteryViewModel.ShowPercentWhenChargingOrSetting.Factory { batteryViewModelShowWhenChargingOrSetting BatteryViewModel.ShowPercentWhenChargingOrSetting(batteryInteractor, testableContext) } } val Kosmos.batteryViewModelAlwaysShowPercent by Kosmos.Fixture { BatteryViewModel.AlwaysShowPercent(batteryInteractor, testableContext) } val Kosmos.batteryViewModelAlwaysShowPercentFactory by Kosmos.Fixture { BatteryViewModel.AlwaysShowPercent.Factory { batteryViewModelAlwaysShowPercent } BatteryViewModel.AlwaysShowPercent.Factory { BatteryViewModel.AlwaysShowPercent( batteryInteractor, testableContext ) } } val Kosmos.batteryWithPercentViewModel by Kosmos.Fixture { BatteryNextToPercentViewModel(batteryInteractor, testableContext) } val Kosmos.batteryWithPercentViewModelFactory by Kosmos.Fixture { object : BatteryNextToPercentViewModel.Factory { override fun create(): BatteryNextToPercentViewModel = batteryWithPercentViewModel override fun create(): BatteryNextToPercentViewModel = BatteryNextToPercentViewModel(batteryInteractor, testableContext) } } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelAlwaysShowPercentTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class BatteryViewModelAlwaysShowPercentTest : SysuiTestCase() { val kosmos = testKosmos() val Kosmos.underTest by Kosmos.Fixture { batteryViewModelAlwaysShowPercent } val Kosmos.underTest by Kosmos.Fixture { batteryViewModelAlwaysShowPercentFactory.create() } @Before fun setUp() { Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelBasedOnSettingTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class BatteryViewModelBasedOnSettingTest : SysuiTestCase() { val kosmos = testKosmos() val Kosmos.underTest by Kosmos.Fixture { batteryViewModelBasedOnSetting } val Kosmos.underTest by Kosmos.Fixture { batteryViewModelBasedOnSettingFactory.create() } @Before fun setUp() { Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelShowWhenChargingTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,9 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class BatteryViewModelShowWhenChargingTest : SysuiTestCase() { val kosmos = testKosmos() val Kosmos.underTest by Kosmos.Fixture { batteryViewModelShowWhenChargingOrSetting } val Kosmos.underTest by Kosmos.Fixture { batteryViewModelShowWhenChargingOrSettingFactory.create() } @Before fun setUp() { Loading
packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/pipeline/battery/ui/viewmodel/BatteryViewModelKosmos.kt +15 −18 Original line number Diff line number Diff line Loading @@ -20,40 +20,37 @@ import android.content.testableContext import com.android.systemui.kosmos.Kosmos import com.android.systemui.statusbar.pipeline.battery.domain.interactor.batteryInteractor val Kosmos.batteryViewModelBasedOnSetting by Kosmos.Fixture { BatteryViewModel.BasedOnUserSetting(batteryInteractor, testableContext) } val Kosmos.batteryViewModelBasedOnSettingFactory by Kosmos.Fixture { BatteryViewModel.BasedOnUserSetting.Factory { batteryViewModelBasedOnSetting } BatteryViewModel.BasedOnUserSetting.Factory { BatteryViewModel.BasedOnUserSetting( batteryInteractor, testableContext ) } val Kosmos.batteryViewModelShowWhenChargingOrSetting by Kosmos.Fixture { BatteryViewModel.ShowPercentWhenChargingOrSetting(batteryInteractor, testableContext) } val Kosmos.batteryViewModelShowWhenChargingOrSettingFactory by Kosmos.Fixture { BatteryViewModel.ShowPercentWhenChargingOrSetting.Factory { batteryViewModelShowWhenChargingOrSetting BatteryViewModel.ShowPercentWhenChargingOrSetting(batteryInteractor, testableContext) } } val Kosmos.batteryViewModelAlwaysShowPercent by Kosmos.Fixture { BatteryViewModel.AlwaysShowPercent(batteryInteractor, testableContext) } val Kosmos.batteryViewModelAlwaysShowPercentFactory by Kosmos.Fixture { BatteryViewModel.AlwaysShowPercent.Factory { batteryViewModelAlwaysShowPercent } BatteryViewModel.AlwaysShowPercent.Factory { BatteryViewModel.AlwaysShowPercent( batteryInteractor, testableContext ) } } val Kosmos.batteryWithPercentViewModel by Kosmos.Fixture { BatteryNextToPercentViewModel(batteryInteractor, testableContext) } val Kosmos.batteryWithPercentViewModelFactory by Kosmos.Fixture { object : BatteryNextToPercentViewModel.Factory { override fun create(): BatteryNextToPercentViewModel = batteryWithPercentViewModel override fun create(): BatteryNextToPercentViewModel = BatteryNextToPercentViewModel(batteryInteractor, testableContext) } }