Loading packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/AccessibilityQsShortcutsRepositoryImplTest.kt +9 −6 Original line number Diff line number Diff line Loading @@ -22,10 +22,11 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Rule Loading @@ -38,13 +39,15 @@ import org.mockito.junit.MockitoRule @SmallTest @RunWith(AndroidJUnit4::class) class AccessibilityQsShortcutsRepositoryImplTest : SysuiTestCase() { private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val testScope = kosmos.testScope private val secureSettings = kosmos.fakeSettings @Rule @JvmField val mockitoRule: MockitoRule = MockitoJUnit.rule() // mocks @Mock private lateinit var a11yManager: AccessibilityManager private val testDispatcher = StandardTestDispatcher() private val testScope = TestScope(testDispatcher) private val secureSettings = FakeSettings() private val userA11yQsShortcutsRepositoryFactory = object : UserA11yQsShortcutsRepository.Factory { Loading packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/ColorCorrectionRepositoryImplTest.kt +8 −6 Original line number Diff line number Diff line Loading @@ -23,11 +23,12 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Before Loading @@ -41,9 +42,10 @@ class ColorCorrectionRepositoryImplTest : SysuiTestCase() { private val testUser1 = UserHandle.of(1)!! private val testUser2 = UserHandle.of(2)!! private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val settings: FakeSettings = FakeSettings() private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val settings = kosmos.fakeSettings private lateinit var underTest: ColorCorrectionRepository Loading packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/ColorInversionRepositoryImplTest.kt +8 −6 Original line number Diff line number Diff line Loading @@ -23,11 +23,12 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Before Loading @@ -41,9 +42,10 @@ class ColorInversionRepositoryImplTest : SysuiTestCase() { private val testUser1 = UserHandle.of(1)!! private val testUser2 = UserHandle.of(2)!! private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val settings: FakeSettings = FakeSettings() private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val settings = kosmos.fakeSettings private lateinit var underTest: ColorInversionRepository Loading packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/NightDisplayRepositoryTest.kt +6 −6 Original line number Diff line number Diff line Loading @@ -26,7 +26,9 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.dagger.NightDisplayListenerModule import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.user.utils.UserScopedService import com.android.systemui.util.mockito.argumentCaptor import com.android.systemui.util.mockito.eq Loading @@ -38,8 +40,6 @@ import com.android.systemui.utils.leaks.FakeLocationController import com.google.common.truth.Truth.assertThat import java.time.LocalTime import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Test Loading @@ -51,7 +51,7 @@ import org.mockito.Mockito.verify @SmallTest @RunWith(AndroidJUnit4::class) class NightDisplayRepositoryTest : SysuiTestCase() { private val kosmos = Kosmos() private val kosmos = testKosmos() private val testUser = UserHandle.of(1)!! private val testStartTime = LocalTime.MIDNIGHT private val testEndTime = LocalTime.NOON Loading @@ -71,8 +71,8 @@ class NightDisplayRepositoryTest : SysuiTestCase() { } private val globalSettings = kosmos.fakeGlobalSettings private val secureSettings = kosmos.fakeSettings private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val userScopedColorDisplayManager = mock<UserScopedService<ColorDisplayManager>> { whenever(forUser(eq(testUser))).thenReturn(colorDisplayManager) Loading packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/OneHandedModeRepositoryImplTest.kt +8 −6 Original line number Diff line number Diff line Loading @@ -22,11 +22,12 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Test Loading @@ -39,9 +40,10 @@ class OneHandedModeRepositoryImplTest : SysuiTestCase() { private val testUser1 = UserHandle.of(1)!! private val testUser2 = UserHandle.of(2)!! private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val settings: FakeSettings = FakeSettings() private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val settings = kosmos.fakeSettings private val underTest: OneHandedModeRepository = OneHandedModeRepositoryImpl( Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/AccessibilityQsShortcutsRepositoryImplTest.kt +9 −6 Original line number Diff line number Diff line Loading @@ -22,10 +22,11 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Rule Loading @@ -38,13 +39,15 @@ import org.mockito.junit.MockitoRule @SmallTest @RunWith(AndroidJUnit4::class) class AccessibilityQsShortcutsRepositoryImplTest : SysuiTestCase() { private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val testScope = kosmos.testScope private val secureSettings = kosmos.fakeSettings @Rule @JvmField val mockitoRule: MockitoRule = MockitoJUnit.rule() // mocks @Mock private lateinit var a11yManager: AccessibilityManager private val testDispatcher = StandardTestDispatcher() private val testScope = TestScope(testDispatcher) private val secureSettings = FakeSettings() private val userA11yQsShortcutsRepositoryFactory = object : UserA11yQsShortcutsRepository.Factory { Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/ColorCorrectionRepositoryImplTest.kt +8 −6 Original line number Diff line number Diff line Loading @@ -23,11 +23,12 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Before Loading @@ -41,9 +42,10 @@ class ColorCorrectionRepositoryImplTest : SysuiTestCase() { private val testUser1 = UserHandle.of(1)!! private val testUser2 = UserHandle.of(2)!! private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val settings: FakeSettings = FakeSettings() private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val settings = kosmos.fakeSettings private lateinit var underTest: ColorCorrectionRepository Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/ColorInversionRepositoryImplTest.kt +8 −6 Original line number Diff line number Diff line Loading @@ -23,11 +23,12 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Before Loading @@ -41,9 +42,10 @@ class ColorInversionRepositoryImplTest : SysuiTestCase() { private val testUser1 = UserHandle.of(1)!! private val testUser2 = UserHandle.of(2)!! private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val settings: FakeSettings = FakeSettings() private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val settings = kosmos.fakeSettings private lateinit var underTest: ColorInversionRepository Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/NightDisplayRepositoryTest.kt +6 −6 Original line number Diff line number Diff line Loading @@ -26,7 +26,9 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.dagger.NightDisplayListenerModule import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.user.utils.UserScopedService import com.android.systemui.util.mockito.argumentCaptor import com.android.systemui.util.mockito.eq Loading @@ -38,8 +40,6 @@ import com.android.systemui.utils.leaks.FakeLocationController import com.google.common.truth.Truth.assertThat import java.time.LocalTime import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Test Loading @@ -51,7 +51,7 @@ import org.mockito.Mockito.verify @SmallTest @RunWith(AndroidJUnit4::class) class NightDisplayRepositoryTest : SysuiTestCase() { private val kosmos = Kosmos() private val kosmos = testKosmos() private val testUser = UserHandle.of(1)!! private val testStartTime = LocalTime.MIDNIGHT private val testEndTime = LocalTime.NOON Loading @@ -71,8 +71,8 @@ class NightDisplayRepositoryTest : SysuiTestCase() { } private val globalSettings = kosmos.fakeGlobalSettings private val secureSettings = kosmos.fakeSettings private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val userScopedColorDisplayManager = mock<UserScopedService<ColorDisplayManager>> { whenever(forUser(eq(testUser))).thenReturn(colorDisplayManager) Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/data/repository/OneHandedModeRepositoryImplTest.kt +8 −6 Original line number Diff line number Diff line Loading @@ -22,11 +22,12 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.util.settings.FakeSettings import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.testKosmos import com.android.systemui.util.settings.fakeSettings import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.StandardTestDispatcher import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Test Loading @@ -39,9 +40,10 @@ class OneHandedModeRepositoryImplTest : SysuiTestCase() { private val testUser1 = UserHandle.of(1)!! private val testUser2 = UserHandle.of(2)!! private val testDispatcher = StandardTestDispatcher() private val scope = TestScope(testDispatcher) private val settings: FakeSettings = FakeSettings() private val kosmos = testKosmos() private val testDispatcher = kosmos.testDispatcher private val scope = kosmos.testScope private val settings = kosmos.fakeSettings private val underTest: OneHandedModeRepository = OneHandedModeRepositoryImpl( Loading