summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Evan Laird <evanlaird@google.com> 2023-04-13 17:03:00 -0400
committer Matt Pietal <mpietal@google.com> 2023-04-14 11:51:48 +0000
commit1fb1a165fa625f8de4ff0651e72baaa19fd40a8d (patch)
tree66ef9fe5fe814bd432651643186df1c46d10f671
parent3273d2f98039062b980365cd3643631023b315d5 (diff)
Remove whitespace from all test functions.
This was generated by running this exact query (who knows what tools that line will break): rg "fun \`" -l | xargs -I {} gsed -i -e '/fun `/s/\(\s*\)fun /\1DONOTSUBMIT/' -e '/DONOTSUBMIT/s/ - /_/g' -e '/DONOTSUBMIT/s/--/_/g' -e '/DONOTSUBMIT/s/\([a-z]\) \([a-z]\)/\1 \U\2/g' -e '/DONOTSUBMIT/s/\s//g' -e '/DONOTSUBMIT/s/`//g' -e '/DONOTSUBMIT/s/DONOTSUBMIT/DONOTSUBMIT /g' -e '/DONOTSUBMIT/s/ \([A-Z]\)\([a-z]\)/ \L\1\2/' -e '/DONOTSUBMIT/s/-\(\S\)/\U\1/g' -e '/DONOTSUBMIT/s/=/ = /' -e '/DONOTSUBMIT/s/{/ { /' -e '/DONOTSUBMIT/s/\s*$//' -e '/DONOTSUBMIT/s/DONOTSUBMIT/ fun/g' {} The breakdown is as follows: - rg queries for any file that contains a function which begins with "fun `" - xargs to execute `gsed` on every file Now for the transformation. Loosely what we do is: - Replace "fun `" with an easily spottable tag - Every command henceforth is filtered to lines starting with our tag - Make the following transforms: 1. replace " - " with a regular underscore 2. replace the few "--" also with an underscore 3. Any word following a space is uppercased 4. Strip all whitespce from the whole line 5. Remove the backtick 6a. Add a space after our tag (important for the next step) 6b. Any function starting with UpperCamelCase is now lowerCamelCase 7. replace any <letter>-<letter> occurences with <letter><UPPERLETTER>. Because I figure "word-pair" is probably better represented as "wordPair" rather than "word_pair" 8. re-add whitespace around the equals sign (if any) 9. re-add whitespace around the opening bracket (if any) 10. trim tailing whitespace 11. replace our token with the corect " fun" line starter -e '/fun `/s/\(\s*\)fun /\1DONOTSUBMIT/' #step 0 -e '/DONOTSUBMIT/s/ - /_/g' #step 1 -e '/DONOTSUBMIT/s/--/_/g' #step 2 -e '/DONOTSUBMIT/s/\([a-z]\) \([a-z]\)/\1 \U\2/g' #step 3 -e '/DONOTSUBMIT/s/\s//g' #step 4 -e '/DONOTSUBMIT/s/`//g' #step 5 -e '/DONOTSUBMIT/s/DONOTSUBMIT/DONOTSUBMIT /g' #step 6a -e '/DONOTSUBMIT/s/ \([A-Z]\)\([a-z]\)/ \L\1\2/' #step 6b -e '/DONOTSUBMIT/s/-\(\S\)/\U\1/g' #step 7 -e '/DONOTSUBMIT/s/=/ = /' #step 8 -e '/DONOTSUBMIT/s/{/ { /' #step 9 -e '/DONOTSUBMIT/s/\s*$//' #step 10 -e '/DONOTSUBMIT/s/DONOTSUBMIT/ fun/g' {} #step 11 NOTE: This CL skipped ktfmt since that only modified lines unrelated to the change Test: run all of the tests Bug: 277739595 Change-Id: I673ebf8992f56f0220652e15534acdb91e60a9dc
-rw-r--r--packages/SystemUI/checks/tests/com/android/internal/systemui/lint/CleanArchitectureDependencyViolationDetectorTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/camera/CameraGestureHelperTest.kt26
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/common/ui/view/LongPressHandlingViewInteractionHandlerTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/demomode/DemoModeControllerTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/CustomizationProviderTest.kt12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt16
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt16
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceCoreStartableTest.kt14
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt14
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt16
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepositoryTest.kt12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt20
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt46
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt22
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt30
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/log/table/TableLogBufferFactoryTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/power/data/repository/PowerRepositoryImplTest.kt14
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/power/domain/interactor/PowerInteractorTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/QsBatteryModeControllerTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/model/SystemUiCarrierConfigTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/CarrierConfigRepositoryTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcherTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt38
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt8
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/LocationBasedMobileIconViewModelTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt10
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconsViewModelTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcherTest.kt2
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BaseUserSwitcherAdapterTest.kt12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/user/data/repository/UserRepositoryImplTest.kt4
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/GuestUserInteractorTest.kt28
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/UserInteractorTest.kt70
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/StatusBarUserChipViewModelTest.kt12
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModelTest.kt16
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualSuggestionsControllerTest.kt10
54 files changed, 325 insertions, 325 deletions
diff --git a/packages/SystemUI/checks/tests/com/android/internal/systemui/lint/CleanArchitectureDependencyViolationDetectorTest.kt b/packages/SystemUI/checks/tests/com/android/internal/systemui/lint/CleanArchitectureDependencyViolationDetectorTest.kt
index a5f832a17de4..ff150c8cba13 100644
--- a/packages/SystemUI/checks/tests/com/android/internal/systemui/lint/CleanArchitectureDependencyViolationDetectorTest.kt
+++ b/packages/SystemUI/checks/tests/com/android/internal/systemui/lint/CleanArchitectureDependencyViolationDetectorTest.kt
@@ -38,7 +38,7 @@ class CleanArchitectureDependencyViolationDetectorTest : SystemUILintDetectorTes
}
@Test
- fun `No violations`() {
+ fun noViolations() {
lint()
.files(
*LEGITIMATE_FILES,
@@ -51,7 +51,7 @@ class CleanArchitectureDependencyViolationDetectorTest : SystemUILintDetectorTes
}
@Test
- fun `Violation - domain depends on ui`() {
+ fun violation_domainDependsOnUi() {
lint()
.files(
*LEGITIMATE_FILES,
@@ -86,7 +86,7 @@ class CleanArchitectureDependencyViolationDetectorTest : SystemUILintDetectorTes
}
@Test
- fun `Violation - ui depends on data`() {
+ fun violation_uiDependsOnData() {
lint()
.files(
*LEGITIMATE_FILES,
@@ -121,7 +121,7 @@ class CleanArchitectureDependencyViolationDetectorTest : SystemUILintDetectorTes
}
@Test
- fun `Violation - shared depends on all other layers`() {
+ fun violation_sharedDependsOnAllOtherLayers() {
lint()
.files(
*LEGITIMATE_FILES,
@@ -166,7 +166,7 @@ class CleanArchitectureDependencyViolationDetectorTest : SystemUILintDetectorTes
}
@Test
- fun `Violation - data depends on domain`() {
+ fun violation_dataDependsOnDomain() {
lint()
.files(
*LEGITIMATE_FILES,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/camera/CameraGestureHelperTest.kt b/packages/SystemUI/tests/src/com/android/systemui/camera/CameraGestureHelperTest.kt
index 80c3e5eaff15..937a7a92ec46 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/camera/CameraGestureHelperTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/camera/CameraGestureHelperTest.kt
@@ -172,64 +172,64 @@ class CameraGestureHelperTest : SysuiTestCase() {
}
@Test
- fun `canCameraGestureBeLaunched - status bar state is keyguard - returns true`() {
+ fun canCameraGestureBeLaunched_statusBarStateIsKeyguard_returnsTrue() {
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.KEYGUARD)).isTrue()
}
@Test
- fun `canCameraGestureBeLaunched - state is shade-locked - returns true`() {
+ fun canCameraGestureBeLaunched_stateIsShadeLocked_returnsTrue() {
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.SHADE_LOCKED)).isTrue()
}
@Test
- fun `canCameraGestureBeLaunched - state is keyguard - camera activity on top - returns true`() {
+ fun canCameraGestureBeLaunched_stateIsKeyguard_cameraActivityOnTop_returnsTrue() {
prepare(isCameraActivityRunningOnTop = true)
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.KEYGUARD)).isTrue()
}
@Test
- fun `canCameraGestureBeLaunched - state is shade-locked - camera activity on top - true`() {
+ fun canCameraGestureBeLaunched_stateIsShadeLocked_cameraActivityOnTop_true() {
prepare(isCameraActivityRunningOnTop = true)
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.SHADE_LOCKED)).isTrue()
}
@Test
- fun `canCameraGestureBeLaunched - not allowed by admin - returns false`() {
+ fun canCameraGestureBeLaunched_notAllowedByAdmin_returnsFalse() {
prepare(isCameraAllowedByAdmin = false)
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.KEYGUARD)).isFalse()
}
@Test
- fun `canCameraGestureBeLaunched - intent does not resolve to any app - returns false`() {
+ fun canCameraGestureBeLaunched_intentDoesNotResolveToAnyApp_returnsFalse() {
prepare(installedCameraAppCount = 0)
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.KEYGUARD)).isFalse()
}
@Test
- fun `canCameraGestureBeLaunched - state is shade - no running tasks - returns true`() {
+ fun canCameraGestureBeLaunched_stateIsShade_noRunningTasks_returnsTrue() {
prepare(isCameraActivityRunningOnTop = false, isTaskListEmpty = true)
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.SHADE)).isTrue()
}
@Test
- fun `canCameraGestureBeLaunched - state is shade - camera activity on top - returns false`() {
+ fun canCameraGestureBeLaunched_stateIsShade_cameraActivityOnTop_returnsFalse() {
prepare(isCameraActivityRunningOnTop = true)
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.SHADE)).isFalse()
}
@Test
- fun `canCameraGestureBeLaunched - state is shade - camera activity not on top - true`() {
+ fun canCameraGestureBeLaunched_stateIsShade_cameraActivityNotOnTop_true() {
assertThat(underTest.canCameraGestureBeLaunched(StatusBarState.SHADE)).isTrue()
}
@Test
- fun `launchCamera - only one camera app installed - using secure screen lock option`() {
+ fun launchCamera_onlyOneCameraAppInstalled_usingSecureScreenLockOption() {
val source = 1337
underTest.launchCamera(source)
@@ -238,7 +238,7 @@ class CameraGestureHelperTest : SysuiTestCase() {
}
@Test
- fun `launchCamera - only one camera app installed - using non-secure screen lock option`() {
+ fun launchCamera_onlyOneCameraAppInstalled_usingNonSecureScreenLockOption() {
prepare(isUsingSecureScreenLockOption = false)
val source = 1337
@@ -248,7 +248,7 @@ class CameraGestureHelperTest : SysuiTestCase() {
}
@Test
- fun `launchCamera - multiple camera apps installed - using secure screen lock option`() {
+ fun launchCamera_multipleCameraAppsInstalled_usingSecureScreenLockOption() {
prepare(installedCameraAppCount = 2)
val source = 1337
@@ -262,7 +262,7 @@ class CameraGestureHelperTest : SysuiTestCase() {
}
@Test
- fun `launchCamera - multiple camera apps installed - using non-secure screen lock option`() {
+ fun launchCamera_multipleCameraAppsInstalled_usingNonSecureScreenLockOption() {
prepare(
isUsingSecureScreenLockOption = false,
installedCameraAppCount = 2,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/common/ui/view/LongPressHandlingViewInteractionHandlerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/common/ui/view/LongPressHandlingViewInteractionHandlerTest.kt
index fe352fd078f0..1b2fc93ddb3f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/common/ui/view/LongPressHandlingViewInteractionHandlerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/common/ui/view/LongPressHandlingViewInteractionHandlerTest.kt
@@ -72,7 +72,7 @@ class LongPressHandlingViewInteractionHandlerTest : SysuiTestCase() {
}
@Test
- fun `long-press`() = runTest {
+ fun longPress() = runTest {
val downX = 123
val downY = 456
dispatchTouchEvents(
@@ -91,7 +91,7 @@ class LongPressHandlingViewInteractionHandlerTest : SysuiTestCase() {
}
@Test
- fun `long-press but feature not enabled`() = runTest {
+ fun longPressButFeatureNotEnabled() = runTest {
underTest.isLongPressHandlingEnabled = false
dispatchTouchEvents(
Down(
@@ -106,7 +106,7 @@ class LongPressHandlingViewInteractionHandlerTest : SysuiTestCase() {
}
@Test
- fun `long-press but view not attached`() = runTest {
+ fun longPressButViewNotAttached() = runTest {
isAttachedToWindow = false
dispatchTouchEvents(
Down(
@@ -121,7 +121,7 @@ class LongPressHandlingViewInteractionHandlerTest : SysuiTestCase() {
}
@Test
- fun `dragged too far to be considered a long-press`() = runTest {
+ fun draggedTooFarToBeConsideredAlongPress() = runTest {
dispatchTouchEvents(
Down(
x = 123,
@@ -138,7 +138,7 @@ class LongPressHandlingViewInteractionHandlerTest : SysuiTestCase() {
}
@Test
- fun `held down too briefly to be considered a long-press`() = runTest {
+ fun heldDownTooBrieflyToBeConsideredAlongPress() = runTest {
dispatchTouchEvents(
Down(
x = 123,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/demomode/DemoModeControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/demomode/DemoModeControllerTest.kt
index 87c66b5a98ac..75eec72a949c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/demomode/DemoModeControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/demomode/DemoModeControllerTest.kt
@@ -74,7 +74,7 @@ class DemoModeControllerTest : SysuiTestCase() {
}
@Test
- fun `demo command flow - returns args`() =
+ fun demoCommandFlow_returnsArgs() =
testScope.runTest {
var latest: Bundle? = null
val flow = underTest.demoFlowForCommand(TEST_COMMAND)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/CustomizationProviderTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/CustomizationProviderTest.kt
index 1044131d17c0..4daecd91efa0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/CustomizationProviderTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/CustomizationProviderTest.kt
@@ -211,7 +211,7 @@ class CustomizationProviderTest : SysuiTestCase() {
}
@Test
- fun `onAttachInfo - reportsContext`() {
+ fun onAttachInfo_reportsContext() {
val callback: SystemUIAppComponentFactoryBase.ContextAvailableCallback = mock()
underTest.setContextAvailableCallback(callback)
@@ -254,7 +254,7 @@ class CustomizationProviderTest : SysuiTestCase() {
}
@Test
- fun `insert and query selection`() =
+ fun insertAndQuerySelection() =
testScope.runTest {
val slotId = KeyguardQuickAffordanceSlots.SLOT_ID_BOTTOM_START
val affordanceId = AFFORDANCE_2
@@ -278,7 +278,7 @@ class CustomizationProviderTest : SysuiTestCase() {
}
@Test
- fun `query slots`() =
+ fun querySlotsProvidesTwoSlots() =
testScope.runTest {
assertThat(querySlots())
.isEqualTo(
@@ -296,7 +296,7 @@ class CustomizationProviderTest : SysuiTestCase() {
}
@Test
- fun `query affordances`() =
+ fun queryAffordancesProvidesTwoAffordances() =
testScope.runTest {
assertThat(queryAffordances())
.isEqualTo(
@@ -316,7 +316,7 @@ class CustomizationProviderTest : SysuiTestCase() {
}
@Test
- fun `delete and query selection`() =
+ fun deleteAndQuerySelection() =
testScope.runTest {
insertSelection(
slotId = KeyguardQuickAffordanceSlots.SLOT_ID_BOTTOM_START,
@@ -351,7 +351,7 @@ class CustomizationProviderTest : SysuiTestCase() {
}
@Test
- fun `delete all selections in a slot`() =
+ fun deleteAllSelectionsInAslot() =
testScope.runTest {
insertSelection(
slotId = KeyguardQuickAffordanceSlots.SLOT_ID_BOTTOM_START,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt
index 5bb8367432fc..e20d3afaca53 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt
@@ -73,7 +73,7 @@ class CameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance triggered -- camera launch called`() {
+ fun affordanceTriggered_cameraLaunchCalled() {
// When
val result = underTest.onTriggered(null)
@@ -84,7 +84,7 @@ class CameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - default when launchable`() =
+ fun getPickerScreenState_defaultWhenLaunchable() =
testScope.runTest {
setLaunchable(true)
@@ -93,7 +93,7 @@ class CameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - unavailable when camera app not installed`() =
+ fun getPickerScreenState_unavailableWhenCameraAppNotInstalled() =
testScope.runTest {
setLaunchable(isCameraAppInstalled = false)
@@ -102,7 +102,7 @@ class CameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - unavailable when camera disabled by admin`() =
+ fun getPickerScreenState_unavailableWhenCameraDisabledByAdmin() =
testScope.runTest {
setLaunchable(isCameraDisabledByDeviceAdmin = true)
@@ -111,7 +111,7 @@ class CameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - unavailable when secure camera disabled by admin`() =
+ fun getPickerScreenState_unavailableWhenSecureCameraDisabledByAdmin() =
testScope.runTest {
setLaunchable(isSecureCameraDisabledByDeviceAdmin = true)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt
index 64839e2c1105..c326a86a4011 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt
@@ -97,7 +97,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `dnd not available - picker state hidden`() =
+ fun dndNotAvailable_pickerStateHidden() =
testScope.runTest {
// given
whenever(zenModeController.isZenAvailable).thenReturn(false)
@@ -113,7 +113,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `dnd available - picker state visible`() =
+ fun dndAvailable_pickerStateVisible() =
testScope.runTest {
// given
whenever(zenModeController.isZenAvailable).thenReturn(true)
@@ -132,7 +132,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `onTriggered - dnd mode is not ZEN_MODE_OFF - set to ZEN_MODE_OFF`() =
+ fun onTriggered_dndModeIsNotZEN_MODE_OFF_setToZEN_MODE_OFF() =
testScope.runTest {
// given
whenever(zenModeController.isZenAvailable).thenReturn(true)
@@ -157,7 +157,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `onTriggered - dnd mode is ZEN_MODE_OFF - setting FOREVER - set zen without condition`() =
+ fun onTriggered_dndModeIsZEN_MODE_OFF_settingFOREVER_setZenWithoutCondition() =
testScope.runTest {
// given
whenever(zenModeController.isZenAvailable).thenReturn(true)
@@ -182,7 +182,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `onTriggered - dnd ZEN_MODE_OFF - setting not FOREVER or PROMPT - zen with condition`() =
+ fun onTriggered_dndZEN_MODE_OFF_settingNotFOREVERorPROMPT_zenWithCondition() =
testScope.runTest {
// given
whenever(zenModeController.isZenAvailable).thenReturn(true)
@@ -207,7 +207,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `onTriggered - dnd mode is ZEN_MODE_OFF - setting is PROMPT - show dialog`() =
+ fun onTriggered_dndModeIsZEN_MODE_OFF_settingIsPROMPT_showDialog() =
testScope.runTest {
// given
val expandable: Expandable = mock()
@@ -230,7 +230,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `lockScreenState - dndAvailable starts as true - change to false - State is Hidden`() =
+ fun lockScreenState_dndAvailableStartsAsTrue_changeToFalse_StateIsHidden() =
testScope.runTest {
// given
whenever(zenModeController.isZenAvailable).thenReturn(true)
@@ -249,7 +249,7 @@ class DoNotDisturbQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `lockScreenState - dndMode starts as ZEN_MODE_OFF - change to not OFF - State Visible`() =
+ fun lockScreenState_dndModeStartsAsZEN_MODE_OFF_changeToNotOFF_StateVisible() =
testScope.runTest {
// given
whenever(zenModeController.isZenAvailable).thenReturn(true)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt
index 31391ee8c0eb..292d06780c5f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt
@@ -60,7 +60,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight is off -- triggered -- icon is on and active`() = runTest {
+ fun flashlightIsOff_triggered_iconIsOnAndActive() = runTest {
// given
flashlightController.isEnabled = false
flashlightController.isAvailable = true
@@ -83,7 +83,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight is on -- triggered -- icon is off and inactive`() = runTest {
+ fun flashlightIsOn_triggered_iconIsOffAndInactive() = runTest {
// given
flashlightController.isEnabled = true
flashlightController.isAvailable = true
@@ -106,7 +106,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight is on -- receives error -- icon is off and inactive`() = runTest {
+ fun flashlightIsOn_receivesError_iconIsOffAndInactive() = runTest {
// given
flashlightController.isEnabled = true
flashlightController.isAvailable = false
@@ -129,7 +129,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight availability now off -- hidden`() = runTest {
+ fun flashlightAvailabilityNowOff_hidden() = runTest {
// given
flashlightController.isEnabled = true
flashlightController.isAvailable = false
@@ -146,7 +146,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight availability now on -- flashlight on -- inactive and icon off`() = runTest {
+ fun flashlightAvailabilityNowOn_flashlightOn_inactiveAndIconOff() = runTest {
// given
flashlightController.isEnabled = true
flashlightController.isAvailable = false
@@ -168,7 +168,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight availability now on -- flashlight off -- inactive and icon off`() = runTest {
+ fun flashlightAvailabilityNowOn_flashlightOff_inactiveAndIconOff() = runTest {
// given
flashlightController.isEnabled = false
flashlightController.isAvailable = false
@@ -190,7 +190,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight available -- picker state default`() = runTest {
+ fun flashlightAvailable_pickerStateDefault() = runTest {
// given
flashlightController.isAvailable = true
@@ -202,7 +202,7 @@ class FlashlightQuickAffordanceConfigTest : LeakCheckedTest() {
}
@Test
- fun `flashlight not available -- picker state unavailable`() = runTest {
+ fun flashlightNotAvailable_pickerStateUnavailable() = runTest {
// given
flashlightController.isAvailable = false
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt
index 2c1c04cefdc7..26f0cdbc2caa 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt
@@ -61,7 +61,7 @@ class HomeControlsKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `state - when cannot show while locked - returns Hidden`() = runBlockingTest {
+ fun state_whenCannotShowWhileLocked_returnsHidden() = runBlockingTest {
whenever(component.canShowWhileLockedSetting).thenReturn(MutableStateFlow(false))
whenever(component.isEnabled()).thenReturn(true)
whenever(component.getTileImageId()).thenReturn(R.drawable.controls_icon)
@@ -81,7 +81,7 @@ class HomeControlsKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `state - when listing controller is missing - returns Hidden`() = runBlockingTest {
+ fun state_whenListingControllerIsMissing_returnsHidden() = runBlockingTest {
whenever(component.isEnabled()).thenReturn(true)
whenever(component.getTileImageId()).thenReturn(R.drawable.controls_icon)
whenever(component.getTileTitleId()).thenReturn(R.string.quick_controls_title)
@@ -100,7 +100,7 @@ class HomeControlsKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `onQuickAffordanceTriggered - canShowWhileLockedSetting is true`() = runBlockingTest {
+ fun onQuickAffordanceTriggered_canShowWhileLockedSettingIsTrue() = runBlockingTest {
whenever(component.canShowWhileLockedSetting).thenReturn(MutableStateFlow(true))
val onClickedResult = underTest.onTriggered(expandable)
@@ -110,7 +110,7 @@ class HomeControlsKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `onQuickAffordanceTriggered - canShowWhileLockedSetting is false`() = runBlockingTest {
+ fun onQuickAffordanceTriggered_canShowWhileLockedSettingIsFalse() = runBlockingTest {
whenever(component.canShowWhileLockedSetting).thenReturn(MutableStateFlow(false))
val onClickedResult = underTest.onTriggered(expandable)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt
index 3bae7f709b69..9a18ba847de8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt
@@ -106,7 +106,7 @@ class KeyguardQuickAffordanceLegacySettingSyncerTest : SysuiTestCase() {
}
@Test
- fun `Setting a setting selects the affordance`() =
+ fun settingAsettingSelectsTheAffordance() =
testScope.runTest {
val job = underTest.startSyncing()
@@ -129,7 +129,7 @@ class KeyguardQuickAffordanceLegacySettingSyncerTest : SysuiTestCase() {
}
@Test
- fun `Clearing a setting selects the affordance`() =
+ fun clearingAsettingSelectsTheAffordance() =
testScope.runTest {
val job = underTest.startSyncing()
@@ -156,7 +156,7 @@ class KeyguardQuickAffordanceLegacySettingSyncerTest : SysuiTestCase() {
}
@Test
- fun `Selecting an affordance sets its setting`() =
+ fun selectingAnAffordanceSetsItsSetting() =
testScope.runTest {
val job = underTest.startSyncing()
@@ -172,7 +172,7 @@ class KeyguardQuickAffordanceLegacySettingSyncerTest : SysuiTestCase() {
}
@Test
- fun `Unselecting an affordance clears its setting`() =
+ fun unselectingAnAffordanceClearsItsSetting() =
testScope.runTest {
val job = underTest.startSyncing()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt
index 1259b478dec5..6989f4467080 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt
@@ -164,7 +164,7 @@ class KeyguardQuickAffordanceLocalUserSelectionManagerTest : SysuiTestCase() {
}
@Test
- fun `remembers selections by user`() = runTest {
+ fun remembersSelectionsByUser() = runTest {
overrideResource(
R.array.config_keyguardQuickAffordanceDefaults,
arrayOf<String>(),
@@ -246,7 +246,7 @@ class KeyguardQuickAffordanceLocalUserSelectionManagerTest : SysuiTestCase() {
}
@Test
- fun `selections respects defaults`() = runTest {
+ fun selectionsRespectsDefaults() = runTest {
val slotId1 = "slot1"
val slotId2 = "slot2"
val affordanceId1 = "affordance1"
@@ -277,7 +277,7 @@ class KeyguardQuickAffordanceLocalUserSelectionManagerTest : SysuiTestCase() {
}
@Test
- fun `selections ignores defaults after selecting an affordance`() = runTest {
+ fun selectionsIgnoresDefaultsAfterSelectingAnAffordance() = runTest {
val slotId1 = "slot1"
val slotId2 = "slot2"
val affordanceId1 = "affordance1"
@@ -309,7 +309,7 @@ class KeyguardQuickAffordanceLocalUserSelectionManagerTest : SysuiTestCase() {
}
@Test
- fun `selections ignores defaults after clearing a slot`() = runTest {
+ fun selectionsIgnoresDefaultsAfterClearingAslot() = runTest {
val slotId1 = "slot1"
val slotId2 = "slot2"
val affordanceId1 = "affordance1"
@@ -341,7 +341,7 @@ class KeyguardQuickAffordanceLocalUserSelectionManagerTest : SysuiTestCase() {
}
@Test
- fun `responds to backup and restore by reloading the selections from disk`() = runTest {
+ fun respondsToBackupAndRestoreByReloadingTheSelectionsFromDisk() = runTest {
overrideResource(R.array.config_keyguardQuickAffordanceDefaults, arrayOf<String>())
val affordanceIdsBySlotId = mutableListOf<Map<String, List<String>>>()
val job =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt
index c08ef42eef03..a1c9f87ee7bc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt
@@ -112,7 +112,7 @@ class KeyguardQuickAffordanceRemoteUserSelectionManagerTest : SysuiTestCase() {
}
@Test
- fun `selections - primary user process`() =
+ fun selections_primaryUserProcess() =
testScope.runTest {
val values = mutableListOf<Map<String, List<String>>>()
val job = launch { underTest.selections.toList(values) }
@@ -163,7 +163,7 @@ class KeyguardQuickAffordanceRemoteUserSelectionManagerTest : SysuiTestCase() {
}
@Test
- fun `selections - secondary user process - always empty`() =
+ fun selections_secondaryUserProcess_alwaysEmpty() =
testScope.runTest {
whenever(userHandle.isSystem).thenReturn(false)
val values = mutableListOf<Map<String, List<String>>>()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt
index 925c06fe8951..c38827a73e5f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt
@@ -85,7 +85,7 @@ class MuteQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `picker state - volume fixed - not available`() = testScope.runTest {
+ fun pickerState_volumeFixed_notAvailable() = testScope.runTest {
//given
whenever(audioManager.isVolumeFixed).thenReturn(true)
@@ -97,7 +97,7 @@ class MuteQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `picker state - volume not fixed - available`() = testScope.runTest {
+ fun pickerState_volumeNotFixed_available() = testScope.runTest {
//given
whenever(audioManager.isVolumeFixed).thenReturn(false)
@@ -109,7 +109,7 @@ class MuteQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `triggered - state was previously NORMAL - currently SILENT - move to previous state`() = testScope.runTest {
+ fun triggered_stateWasPreviouslyNORMAL_currentlySILENT_moveToPreviousState() = testScope.runTest {
//given
val ringerModeCapture = argumentCaptor<Int>()
whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL)
@@ -127,7 +127,7 @@ class MuteQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `triggered - state is not SILENT - move to SILENT ringer`() = testScope.runTest {
+ fun triggered_stateIsNotSILENT_moveToSILENTringer() = testScope.runTest {
//given
val ringerModeCapture = argumentCaptor<Int>()
whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceCoreStartableTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceCoreStartableTest.kt
index facc7475f034..f243d7b45990 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceCoreStartableTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceCoreStartableTest.kt
@@ -101,7 +101,7 @@ class MuteQuickAffordanceCoreStartableTest : SysuiTestCase() {
}
@Test
- fun `feature flag is OFF - do nothing with keyguardQuickAffordanceRepository`() = testScope.runTest {
+ fun featureFlagIsOFF_doNothingWithKeyguardQuickAffordanceRepository() = testScope.runTest {
//given
whenever(featureFlags.isEnabled(Flags.CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES)).thenReturn(false)
@@ -114,7 +114,7 @@ class MuteQuickAffordanceCoreStartableTest : SysuiTestCase() {
}
@Test
- fun `feature flag is ON - call to keyguardQuickAffordanceRepository`() = testScope.runTest {
+ fun featureFlagIsON_callToKeyguardQuickAffordanceRepository() = testScope.runTest {
//given
val ringerModeInternal = mock<MutableLiveData<Int>>()
whenever(ringerModeTracker.ringerModeInternal).thenReturn(ringerModeInternal)
@@ -129,7 +129,7 @@ class MuteQuickAffordanceCoreStartableTest : SysuiTestCase() {
}
@Test
- fun `ringer mode is changed to SILENT - do not save to shared preferences`() = testScope.runTest {
+ fun ringerModeIsChangedToSILENT_doNotSaveToSharedPreferences() = testScope.runTest {
//given
val ringerModeInternal = mock<MutableLiveData<Int>>()
val observerCaptor = argumentCaptor<Observer<Int>>()
@@ -147,7 +147,7 @@ class MuteQuickAffordanceCoreStartableTest : SysuiTestCase() {
}
@Test
- fun `ringerModeInternal changes to something not SILENT - is set in sharedpreferences`() = testScope.runTest {
+ fun ringerModeInternalChangesToSomethingNotSILENT_isSetInSharedpreferences() = testScope.runTest {
//given
val newRingerMode = 99
val observerCaptor = argumentCaptor<Observer<Int>>()
@@ -172,7 +172,7 @@ class MuteQuickAffordanceCoreStartableTest : SysuiTestCase() {
}
@Test
- fun `MUTE is in selections - observe ringerModeInternal`() = testScope.runTest {
+ fun MUTEisInSelections_observeRingerModeInternal() = testScope.runTest {
//given
val ringerModeInternal = mock<MutableLiveData<Int>>()
whenever(ringerModeTracker.ringerModeInternal).thenReturn(ringerModeInternal)
@@ -187,7 +187,7 @@ class MuteQuickAffordanceCoreStartableTest : SysuiTestCase() {
}
@Test
- fun `MUTE is in selections 2x - observe ringerModeInternal`() = testScope.runTest {
+ fun MUTEisInSelections2x_observeRingerModeInternal() = testScope.runTest {
//given
val config: KeyguardQuickAffordanceConfig = mock()
whenever(config.key).thenReturn(BuiltInKeyguardQuickAffordanceKeys.MUTE)
@@ -206,7 +206,7 @@ class MuteQuickAffordanceCoreStartableTest : SysuiTestCase() {
}
@Test
- fun `MUTE is not in selections - stop observing ringerModeInternal`() = testScope.runTest {
+ fun MUTEisNotInSelections_stopObservingRingerModeInternal() = testScope.runTest {
//given
val config: KeyguardQuickAffordanceConfig = mock()
whenever(config.key).thenReturn("notmutequickaffordance")
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt
index 1adf808cf645..faf18d379270 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt
@@ -55,7 +55,7 @@ class QrCodeScannerKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - sets up registration and delivers initial model`() = runBlockingTest {
+ fun affordance_setsUpRegistrationAndDeliversInitialModel() = runBlockingTest {
whenever(controller.isEnabledForLockScreenButton).thenReturn(true)
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
@@ -75,7 +75,7 @@ class QrCodeScannerKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - scanner activity changed - delivers model with updated intent`() =
+ fun affordance_scannerActivityChanged_deliversModelWithUpdatedIntent() =
runBlockingTest {
whenever(controller.isEnabledForLockScreenButton).thenReturn(true)
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
@@ -93,7 +93,7 @@ class QrCodeScannerKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - scanner preference changed - delivers visible model`() = runBlockingTest {
+ fun affordance_scannerPreferenceChanged_deliversVisibleModel() = runBlockingTest {
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
val job = underTest.lockScreenState.onEach { latest = it }.launchIn(this)
val callbackCaptor = argumentCaptor<QRCodeScannerController.Callback>()
@@ -109,7 +109,7 @@ class QrCodeScannerKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - scanner preference changed - delivers none`() = runBlockingTest {
+ fun affordance_scannerPreferenceChanged_deliversNone() = runBlockingTest {
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
val job = underTest.lockScreenState.onEach { latest = it }.launchIn(this)
val callbackCaptor = argumentCaptor<QRCodeScannerController.Callback>()
@@ -136,7 +136,7 @@ class QrCodeScannerKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - enabled if configured on device - can open camera`() = runTest {
+ fun getPickerScreenState_enabledIfConfiguredOnDevice_canOpenCamera() = runTest {
whenever(controller.isAvailableOnDevice).thenReturn(true)
whenever(controller.isAbleToOpenCameraApp).thenReturn(true)
@@ -145,7 +145,7 @@ class QrCodeScannerKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - disabled if configured on device - cannot open camera`() = runTest {
+ fun getPickerScreenState_disabledIfConfiguredOnDevice_cannotOpenCamera() = runTest {
whenever(controller.isAvailableOnDevice).thenReturn(true)
whenever(controller.isAbleToOpenCameraApp).thenReturn(false)
@@ -154,7 +154,7 @@ class QrCodeScannerKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - unavailable if not configured on device`() = runTest {
+ fun getPickerScreenState_unavailableIfNotConfiguredOnDevice() = runTest {
whenever(controller.isAvailableOnDevice).thenReturn(false)
whenever(controller.isAbleToOpenCameraApp).thenReturn(true)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt
index 752963fad92d..952882da1db5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt
@@ -69,7 +69,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - keyguard showing - has wallet card - visible model`() = runBlockingTest {
+ fun affordance_keyguardShowing_hasWalletCard_visibleModel() = runBlockingTest {
setUpState()
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
@@ -90,7 +90,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - wallet not enabled - model is none`() = runBlockingTest {
+ fun affordance_walletNotEnabled_modelIsNone() = runBlockingTest {
setUpState(isWalletEnabled = false)
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
@@ -102,7 +102,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - query not successful - model is none`() = runBlockingTest {
+ fun affordance_queryNotSuccessful_modelIsNone() = runBlockingTest {
setUpState(isWalletQuerySuccessful = false)
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
@@ -114,7 +114,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `affordance - no selected card - model is none`() = runBlockingTest {
+ fun affordance_noSelectedCard_modelIsNone() = runBlockingTest {
setUpState(hasSelectedCard = false)
var latest: KeyguardQuickAffordanceConfig.LockScreenState? = null
@@ -143,7 +143,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - default`() = runTest {
+ fun getPickerScreenState_default() = runTest {
setUpState()
assertThat(underTest.getPickerScreenState())
@@ -151,7 +151,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - unavailable`() = runTest {
+ fun getPickerScreenState_unavailable() = runTest {
setUpState(
isWalletServiceAvailable = false,
)
@@ -161,7 +161,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - disabled when the feature is not enabled`() = runTest {
+ fun getPickerScreenState_disabledWhenTheFeatureIsNotEnabled() = runTest {
setUpState(
isWalletEnabled = false,
)
@@ -171,7 +171,7 @@ class QuickAccessWalletKeyguardQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - disabled when there is no card`() = runTest {
+ fun getPickerScreenState_disabledWhenThereIsNoCard() = runTest {
setUpState(
hasSelectedCard = false,
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt
index f1b9c5f0fff8..a9b9c9011636 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt
@@ -73,7 +73,7 @@ class VideoCameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `lockScreenState - visible when launchable`() =
+ fun lockScreenState_visibleWhenLaunchable() =
testScope.runTest {
setLaunchable()
@@ -84,7 +84,7 @@ class VideoCameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `lockScreenState - hidden when app not installed on device`() =
+ fun lockScreenState_hiddenWhenAppNotInstalledOnDevice() =
testScope.runTest {
setLaunchable(isVideoCameraAppInstalled = false)
@@ -95,7 +95,7 @@ class VideoCameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `lockScreenState - hidden when camera disabled by admin`() =
+ fun lockScreenState_hiddenWhenCameraDisabledByAdmin() =
testScope.runTest {
setLaunchable(isCameraDisabledByAdmin = true)
@@ -106,7 +106,7 @@ class VideoCameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - default when launchable`() =
+ fun getPickerScreenState_defaultWhenLaunchable() =
testScope.runTest {
setLaunchable()
@@ -115,7 +115,7 @@ class VideoCameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - unavailable when app not installed on device`() =
+ fun getPickerScreenState_unavailableWhenAppNotInstalledOnDevice() =
testScope.runTest {
setLaunchable(isVideoCameraAppInstalled = false)
@@ -124,7 +124,7 @@ class VideoCameraQuickAffordanceConfigTest : SysuiTestCase() {
}
@Test
- fun `getPickerScreenState - unavailable when camera disabled by admin`() =
+ fun getPickerScreenState_unavailableWhenCameraDisabledByAdmin() =
testScope.runTest {
setLaunchable(isCameraDisabledByAdmin = true)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt
index a668af340e7b..12b8261fd140 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt
@@ -258,7 +258,7 @@ class KeyguardQuickAffordanceRepositoryTest : SysuiTestCase() {
}
@Test
- fun `selections for secondary user`() =
+ fun selectionsForSecondaryUser() =
testScope.runTest {
userTracker.set(
userInfos =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt
index 3fd97da23157..b53a43427ec7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt
@@ -281,7 +281,7 @@ class KeyguardRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isDozing - starts with correct initial value for isDozing`() =
+ fun isDozing_startsWithCorrectInitialValueForIsDozing() =
testScope.runTest {
var latest: Boolean? = null
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepositoryTest.kt
index d9d4013b09b9..d0bfaa9bedc9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/KeyguardTransitionRepositoryTest.kt
@@ -70,7 +70,7 @@ class KeyguardTransitionRepositoryTest : SysuiTestCase() {
}
@Test
- fun `startTransition runs animator to completion`() =
+ fun startTransitionRunsAnimatorToCompletion() =
TestScope().runTest {
val steps = mutableListOf<TransitionStep>()
val job = underTest.transition(AOD, LOCKSCREEN).onEach { steps.add(it) }.launchIn(this)
@@ -86,7 +86,7 @@ class KeyguardTransitionRepositoryTest : SysuiTestCase() {
}
@Test
- fun `starting second transition will cancel the first transition`() =
+ fun startingSecondTransitionWillCancelTheFirstTransition() =
TestScope().runTest {
val steps = mutableListOf<TransitionStep>()
val job = underTest.transition(AOD, LOCKSCREEN).onEach { steps.add(it) }.launchIn(this)
@@ -114,7 +114,7 @@ class KeyguardTransitionRepositoryTest : SysuiTestCase() {
}
@Test
- fun `Null animator enables manual control with updateTransition`() =
+ fun nullAnimatorEnablesManualControlWithUpdateTransition() =
TestScope().runTest {
val steps = mutableListOf<TransitionStep>()
val job = underTest.transition(AOD, LOCKSCREEN).onEach { steps.add(it) }.launchIn(this)
@@ -146,13 +146,13 @@ class KeyguardTransitionRepositoryTest : SysuiTestCase() {
}
@Test
- fun `Attempt to manually update transition with invalid UUID throws exception`() {
+ fun attemptTomanuallyUpdateTransitionWithInvalidUUIDthrowsException() {
underTest.updateTransition(UUID.randomUUID(), 0f, TransitionState.RUNNING)
assertThat(wtfHandler.failed).isTrue()
}
@Test
- fun `Attempt to manually update transition after FINISHED state throws exception`() {
+ fun attemptToManuallyUpdateTransitionAfterFINISHEDstateThrowsException() {
val uuid =
underTest.startTransition(
TransitionInfo(
@@ -171,7 +171,7 @@ class KeyguardTransitionRepositoryTest : SysuiTestCase() {
}
@Test
- fun `Attempt to manually update transition after CANCELED state throws exception`() {
+ fun attemptToManuallyUpdateTransitionAfterCANCELEDstateThrowsException() {
val uuid =
underTest.startTransition(
TransitionInfo(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt
index f9493d10ff61..9daf3f3ae2f0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt
@@ -48,7 +48,7 @@ class LightRevealScrimRepositoryTest : SysuiTestCase() {
}
@Test
- fun `nextRevealEffect - effect switches between default and biometric with no dupes`() =
+ fun nextRevealEffect_effectSwitchesBetweenDefaultAndBiometricWithNoDupes() =
runTest {
val values = mutableListOf<LightRevealEffect>()
val job = launch { underTest.revealEffect.collect { values.add(it) } }
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt
index 77bb12c2cbda..8a0cf4f84da9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt
@@ -92,7 +92,7 @@ class KeyguardLongPressInteractorTest : SysuiTestCase() {
}
@Test
- fun `isEnabled - always false when quick settings are visible`() =
+ fun isEnabled_alwaysFalseWhenQuickSettingsAreVisible() =
testScope.runTest {
val isEnabled = collectLastValue(underTest.isLongPressHandlingEnabled)
KeyguardState.values().forEach { keyguardState ->
@@ -163,7 +163,7 @@ class KeyguardLongPressInteractorTest : SysuiTestCase() {
}
@Test
- fun `long pressed - close dialogs broadcast received - popup dismissed`() =
+ fun longPressed_closeDialogsBroadcastReceived_popupDismissed() =
testScope.runTest {
val isMenuVisible by collectLastValue(underTest.isMenuVisible)
runCurrent()
@@ -211,7 +211,7 @@ class KeyguardLongPressInteractorTest : SysuiTestCase() {
}
@Test
- fun `logs when menu is shown`() =
+ fun logsWhenMenuIsShown() =
testScope.runTest {
collectLastValue(underTest.isMenuVisible)
runCurrent()
@@ -223,7 +223,7 @@ class KeyguardLongPressInteractorTest : SysuiTestCase() {
}
@Test
- fun `logs when menu is clicked`() =
+ fun logsWhenMenuIsClicked() =
testScope.runTest {
collectLastValue(underTest.isMenuVisible)
runCurrent()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt
index 503e0025ce5c..96fff6499be5 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt
@@ -195,7 +195,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordance - bottom start affordance is visible`() =
+ fun quickAffordance_bottomStartAffordanceIsVisible() =
testScope.runTest {
val configKey = BuiltInKeyguardQuickAffordanceKeys.HOME_CONTROLS
homeControls.setState(
@@ -221,7 +221,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordance - bottom end affordance is visible`() =
+ fun quickAffordance_bottomEndAffordanceIsVisible() =
testScope.runTest {
val configKey = BuiltInKeyguardQuickAffordanceKeys.QUICK_ACCESS_WALLET
quickAccessWallet.setState(
@@ -246,7 +246,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordance - hidden when all features are disabled by device policy`() =
+ fun quickAffordance_hiddenWhenAllFeaturesAreDisabledByDevicePolicy() =
testScope.runTest {
whenever(devicePolicyManager.getKeyguardDisabledFeatures(null, userTracker.userId))
.thenReturn(DevicePolicyManager.KEYGUARD_DISABLE_FEATURES_ALL)
@@ -265,7 +265,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordance - hidden when shortcuts feature is disabled by device policy`() =
+ fun quickAffordance_hiddenWhenShortcutsFeatureIsDisabledByDevicePolicy() =
testScope.runTest {
whenever(devicePolicyManager.getKeyguardDisabledFeatures(null, userTracker.userId))
.thenReturn(DevicePolicyManager.KEYGUARD_DISABLE_SHORTCUTS_ALL)
@@ -284,7 +284,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordance - hidden when quick settings is visible`() =
+ fun quickAffordance_hiddenWhenQuickSettingsIsVisible() =
testScope.runTest {
repository.setQuickSettingsVisible(true)
quickAccessWallet.setState(
@@ -302,7 +302,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordance - bottom start affordance hidden while dozing`() =
+ fun quickAffordance_bottomStartAffordanceHiddenWhileDozing() =
testScope.runTest {
repository.setDozing(true)
homeControls.setState(
@@ -319,7 +319,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordance - bottom start affordance hidden when lockscreen is not showing`() =
+ fun quickAffordance_bottomStartAffordanceHiddenWhenLockscreenIsNotShowing() =
testScope.runTest {
repository.setKeyguardShowing(false)
homeControls.setState(
@@ -336,7 +336,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `quickAffordanceAlwaysVisible - even when lock screen not showing and dozing`() =
+ fun quickAffordanceAlwaysVisible_evenWhenLockScreenNotShowingAndDozing() =
testScope.runTest {
repository.setKeyguardShowing(false)
repository.setDozing(true)
@@ -511,7 +511,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `unselect - one`() =
+ fun unselect_one() =
testScope.runTest {
featureFlags.set(Flags.CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES, true)
homeControls.setState(
@@ -588,7 +588,7 @@ class KeyguardQuickAffordanceInteractorTest : SysuiTestCase() {
}
@Test
- fun `unselect - all`() =
+ fun unselect_all() =
testScope.runTest {
featureFlags.set(Flags.CUSTOMIZABLE_LOCK_SCREEN_QUICK_AFFORDANCES, true)
homeControls.setState(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt
index 276b3e39180b..503687df25d9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt
@@ -52,7 +52,7 @@ class KeyguardTransitionInteractorTest : SysuiTestCase() {
}
@Test
- fun `transition collectors receives only appropriate events`() = runTest {
+ fun transitionCollectorsReceivesOnlyAppropriateEvents() = runTest {
val lockscreenToAodSteps by collectValues(underTest.lockscreenToAodTransition)
val aodToLockscreenSteps by collectValues(underTest.aodToLockscreenTransition)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
index e2d0ec3ae01b..fe65236c699f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionScenariosTest.kt
@@ -180,7 +180,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `DREAMING to LOCKSCREEN`() =
+ fun DREAMINGtoLOCKSCREEN() =
testScope.runTest {
// GIVEN a device is dreaming
keyguardRepository.setDreamingWithOverlay(true)
@@ -215,7 +215,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `LOCKSCREEN to PRIMARY_BOUNCER via bouncer showing call`() =
+ fun LOCKSCREENtoPRIMARY_BOUNCERviaBouncerShowingCall() =
testScope.runTest {
// GIVEN a device that has at least woken up
keyguardRepository.setWakefulnessModel(startingToWake())
@@ -242,7 +242,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `OCCLUDED to DOZING`() =
+ fun OCCLUDEDtoDOZING() =
testScope.runTest {
// GIVEN a device with AOD not available
keyguardRepository.setAodAvailable(false)
@@ -269,7 +269,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `OCCLUDED to AOD`() =
+ fun OCCLUDEDtoAOD() =
testScope.runTest {
// GIVEN a device with AOD available
keyguardRepository.setAodAvailable(true)
@@ -296,7 +296,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `LOCKSCREEN to DREAMING`() =
+ fun LOCKSCREENtoDREAMING() =
testScope.runTest {
// GIVEN a device that is not dreaming or dozing
keyguardRepository.setDreamingWithOverlay(false)
@@ -327,7 +327,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `LOCKSCREEN to DOZING`() =
+ fun LOCKSCREENtoDOZING() =
testScope.runTest {
// GIVEN a device with AOD not available
keyguardRepository.setAodAvailable(false)
@@ -354,7 +354,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `LOCKSCREEN to AOD`() =
+ fun LOCKSCREENtoAOD() =
testScope.runTest {
// GIVEN a device with AOD available
keyguardRepository.setAodAvailable(true)
@@ -381,7 +381,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `DOZING to LOCKSCREEN`() =
+ fun DOZINGtoLOCKSCREEN() =
testScope.runTest {
// GIVEN a prior transition has run to DOZING
runTransition(KeyguardState.LOCKSCREEN, KeyguardState.DOZING)
@@ -404,7 +404,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `DOZING to LOCKSCREEN cannot be interruped by DREAMING`() =
+ fun DOZINGtoLOCKSCREENcannotBeInterrupedByDREAMING() =
testScope.runTest {
// GIVEN a prior transition has started to LOCKSCREEN
transitionRepository.sendTransitionStep(
@@ -430,7 +430,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `DOZING to GONE`() =
+ fun DOZINGtoGONE() =
testScope.runTest {
// GIVEN a prior transition has run to DOZING
runTransition(KeyguardState.LOCKSCREEN, KeyguardState.DOZING)
@@ -453,7 +453,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `GONE to DOZING`() =
+ fun GONEtoDOZING() =
testScope.runTest {
// GIVEN a device with AOD not available
keyguardRepository.setAodAvailable(false)
@@ -480,7 +480,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `GONE to AOD`() =
+ fun GONEtoAOD() =
testScope.runTest {
// GIVEN a device with AOD available
keyguardRepository.setAodAvailable(true)
@@ -507,7 +507,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `GONE to LOCKSREEN`() =
+ fun GONEtoLOCKSREEN() =
testScope.runTest {
// GIVEN a prior transition has run to GONE
runTransition(KeyguardState.LOCKSCREEN, KeyguardState.GONE)
@@ -530,7 +530,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `GONE to DREAMING`() =
+ fun GONEtoDREAMING() =
testScope.runTest {
// GIVEN a device that is not dreaming or dozing
keyguardRepository.setDreamingWithOverlay(false)
@@ -561,7 +561,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `ALTERNATE_BOUNCER to PRIMARY_BOUNCER`() =
+ fun ALTERNATE_BOUNCERtoPRIMARY_BOUNCER() =
testScope.runTest {
// GIVEN a prior transition has run to ALTERNATE_BOUNCER
runTransition(KeyguardState.LOCKSCREEN, KeyguardState.ALTERNATE_BOUNCER)
@@ -584,7 +584,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `ALTERNATE_BOUNCER to AOD`() =
+ fun ALTERNATE_BOUNCERtoAOD() =
testScope.runTest {
// GIVEN a prior transition has run to ALTERNATE_BOUNCER
bouncerRepository.setAlternateVisible(true)
@@ -613,7 +613,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `ALTERNATE_BOUNCER to DOZING`() =
+ fun ALTERNATE_BOUNCERtoDOZING() =
testScope.runTest {
// GIVEN a prior transition has run to ALTERNATE_BOUNCER
bouncerRepository.setAlternateVisible(true)
@@ -643,7 +643,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `ALTERNATE_BOUNCER to LOCKSCREEN`() =
+ fun ALTERNATE_BOUNCERtoLOCKSCREEN() =
testScope.runTest {
// GIVEN a prior transition has run to ALTERNATE_BOUNCER
bouncerRepository.setAlternateVisible(true)
@@ -671,7 +671,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `PRIMARY_BOUNCER to AOD`() =
+ fun PRIMARY_BOUNCERtoAOD() =
testScope.runTest {
// GIVEN a prior transition has run to PRIMARY_BOUNCER
bouncerRepository.setPrimaryShow(true)
@@ -699,7 +699,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `PRIMARY_BOUNCER to DOZING`() =
+ fun PRIMARY_BOUNCERtoDOZING() =
testScope.runTest {
// GIVEN a prior transition has run to PRIMARY_BOUNCER
bouncerRepository.setPrimaryShow(true)
@@ -727,7 +727,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `PRIMARY_BOUNCER to LOCKSCREEN`() =
+ fun PRIMARY_BOUNCERtoLOCKSCREEN() =
testScope.runTest {
// GIVEN a prior transition has run to PRIMARY_BOUNCER
bouncerRepository.setPrimaryShow(true)
@@ -754,7 +754,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `OCCLUDED to GONE`() =
+ fun OCCLUDEDtoGONE() =
testScope.runTest {
// GIVEN a device on lockscreen
keyguardRepository.setKeyguardShowing(true)
@@ -785,7 +785,7 @@ class KeyguardTransitionScenariosTest : SysuiTestCase() {
}
@Test
- fun `OCCLUDED to LOCKSCREEN`() =
+ fun OCCLUDEDtoLOCKSCREEN() =
testScope.runTest {
// GIVEN a device on lockscreen
keyguardRepository.setKeyguardShowing(true)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt
index 62366164a17d..359854b34496 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt
@@ -69,7 +69,7 @@ class LightRevealScrimInteractorTest : SysuiTestCase() {
}
@Test
- fun `lightRevealEffect - does not change during keyguard transition`() =
+ fun lightRevealEffect_doesNotChangeDuringKeyguardTransition() =
runTest(UnconfinedTestDispatcher()) {
val values = mutableListOf<LightRevealEffect>()
val job = underTest.lightRevealEffect.onEach(values::add).launchIn(this)
@@ -103,7 +103,7 @@ class LightRevealScrimInteractorTest : SysuiTestCase() {
}
@Test
- fun `revealAmount - inverted when appropriate`() =
+ fun revealAmount_invertedWhenAppropriate() =
runTest(UnconfinedTestDispatcher()) {
val values = mutableListOf<Float>()
val job = underTest.revealAmount.onEach(values::add).launchIn(this)
@@ -132,7 +132,7 @@ class LightRevealScrimInteractorTest : SysuiTestCase() {
}
@Test
- fun `revealAmount - ignores transitions that do not affect reveal amount`() =
+ fun revealAmount_ignoresTransitionsThatDoNotAffectRevealAmount() =
runTest(UnconfinedTestDispatcher()) {
val values = mutableListOf<Float>()
val job = underTest.revealAmount.onEach(values::add).launchIn(this)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt
index 224eec1bf3ac..2361c59a5c64 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBottomAreaViewModelTest.kt
@@ -251,7 +251,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `startButton - present - visible model - starts activity on click`() =
+ fun startButton_present_visibleModel_startsActivityOnClick() =
testScope.runTest {
repository.setKeyguardShowing(true)
val latest = collectLastValue(underTest.startButton)
@@ -280,7 +280,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `startButton - hidden when device policy disables all keyguard features`() =
+ fun startButton_hiddenWhenDevicePolicyDisablesAllKeyguardFeatures() =
testScope.runTest {
whenever(devicePolicyManager.getKeyguardDisabledFeatures(null, userTracker.userId))
.thenReturn(DevicePolicyManager.KEYGUARD_DISABLE_FEATURES_ALL)
@@ -315,7 +315,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `startButton - in preview mode - visible even when keyguard not showing`() =
+ fun startButton_inPreviewMode_visibleEvenWhenKeyguardNotShowing() =
testScope.runTest {
underTest.enablePreviewMode(
initiallySelectedSlotId = KeyguardQuickAffordanceSlots.SLOT_ID_BOTTOM_START,
@@ -359,7 +359,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `endButton - in higlighted preview mode - dimmed when other is selected`() =
+ fun endButton_inHiglightedPreviewMode_dimmedWhenOtherIsSelected() =
testScope.runTest {
underTest.enablePreviewMode(
initiallySelectedSlotId = KeyguardQuickAffordanceSlots.SLOT_ID_BOTTOM_START,
@@ -416,7 +416,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `endButton - present - visible model - do nothing on click`() =
+ fun endButton_present_visibleModel_doNothingOnClick() =
testScope.runTest {
repository.setKeyguardShowing(true)
val latest = collectLastValue(underTest.endButton)
@@ -445,7 +445,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `startButton - not present - model is hidden`() =
+ fun startButton_notPresent_modelIsHidden() =
testScope.runTest {
val latest = collectLastValue(underTest.startButton)
@@ -524,7 +524,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `alpha - in preview mode - does not change`() =
+ fun alpha_inPreviewMode_doesNotChange() =
testScope.runTest {
underTest.enablePreviewMode(
initiallySelectedSlotId = null,
@@ -629,7 +629,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `isClickable - true when alpha at threshold`() =
+ fun isClickable_trueWhenAlphaAtThreshold() =
testScope.runTest {
repository.setKeyguardShowing(true)
repository.setBottomAreaAlpha(
@@ -661,7 +661,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `isClickable - true when alpha above threshold`() =
+ fun isClickable_trueWhenAlphaAboveThreshold() =
testScope.runTest {
repository.setKeyguardShowing(true)
val latest = collectLastValue(underTest.startButton)
@@ -692,7 +692,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `isClickable - false when alpha below threshold`() =
+ fun isClickable_falseWhenAlphaBelowThreshold() =
testScope.runTest {
repository.setKeyguardShowing(true)
val latest = collectLastValue(underTest.startButton)
@@ -723,7 +723,7 @@ class KeyguardBottomAreaViewModelTest : SysuiTestCase() {
}
@Test
- fun `isClickable - false when alpha at zero`() =
+ fun isClickable_falseWhenAlphaAtZero() =
testScope.runTest {
repository.setKeyguardShowing(true)
val latest = collectLastValue(underTest.startButton)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt b/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt
index ea11f01ed580..afab25092278 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/lifecycle/RepeatWhenAttachedTest.kt
@@ -88,7 +88,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test(expected = IllegalStateException::class)
- fun `repeatWhenAttached - enforces main thread`() =
+ fun repeatWhenAttached_enforcesMainThread() =
testScope.runTest {
Assert.setTestThread(null)
@@ -96,7 +96,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test(expected = IllegalStateException::class)
- fun `repeatWhenAttached - dispose enforces main thread`() =
+ fun repeatWhenAttached_disposeEnforcesMainThread() =
testScope.runTest {
val disposableHandle = repeatWhenAttached()
Assert.setTestThread(null)
@@ -105,7 +105,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - view starts detached - runs block when attached`() =
+ fun repeatWhenAttached_viewStartsDetached_runsBlockWhenAttached() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(false)
repeatWhenAttached()
@@ -120,7 +120,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - view already attached - immediately runs block`() =
+ fun repeatWhenAttached_viewAlreadyAttached_immediatelyRunsBlock() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
@@ -132,7 +132,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - starts visible without focus - STARTED`() =
+ fun repeatWhenAttached_startsVisibleWithoutFocus_STARTED() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
whenever(view.windowVisibility).thenReturn(View.VISIBLE)
@@ -145,7 +145,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - starts with focus but invisible - CREATED`() =
+ fun repeatWhenAttached_startsWithFocusButInvisible_CREATED() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
whenever(view.hasWindowFocus()).thenReturn(true)
@@ -158,7 +158,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - starts visible and with focus - RESUMED`() =
+ fun repeatWhenAttached_startsVisibleAndWithFocus_RESUMED() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
whenever(view.windowVisibility).thenReturn(View.VISIBLE)
@@ -172,7 +172,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - becomes visible without focus - STARTED`() =
+ fun repeatWhenAttached_becomesVisibleWithoutFocus_STARTED() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
repeatWhenAttached()
@@ -188,7 +188,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - gains focus but invisible - CREATED`() =
+ fun repeatWhenAttached_gainsFocusButInvisible_CREATED() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
repeatWhenAttached()
@@ -204,7 +204,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - becomes visible and gains focus - RESUMED`() =
+ fun repeatWhenAttached_becomesVisibleAndGainsFocus_RESUMED() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
repeatWhenAttached()
@@ -224,7 +224,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - view gets detached - destroys the lifecycle`() =
+ fun repeatWhenAttached_viewGetsDetached_destroysTheLifecycle() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
repeatWhenAttached()
@@ -238,7 +238,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - view gets reattached - recreates a lifecycle`() =
+ fun repeatWhenAttached_viewGetsReattached_recreatesAlifecycle() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
repeatWhenAttached()
@@ -255,7 +255,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - dispose attached`() =
+ fun repeatWhenAttached_disposeAttached() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
val handle = repeatWhenAttached()
@@ -269,7 +269,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - dispose never attached`() =
+ fun repeatWhenAttached_disposeNeverAttached() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(false)
val handle = repeatWhenAttached()
@@ -281,7 +281,7 @@ class RepeatWhenAttachedTest : SysuiTestCase() {
}
@Test
- fun `repeatWhenAttached - dispose previously attached now detached`() =
+ fun repeatWhenAttached_disposePreviouslyAttachedNowDetached() =
testScope.runTest {
whenever(view.isAttachedToWindow).thenReturn(true)
val handle = repeatWhenAttached()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/log/table/TableLogBufferFactoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/log/table/TableLogBufferFactoryTest.kt
index 411b1bd04c52..af83a560d7d0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/log/table/TableLogBufferFactoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/log/table/TableLogBufferFactoryTest.kt
@@ -31,7 +31,7 @@ class TableLogBufferFactoryTest : SysuiTestCase() {
private val underTest = TableLogBufferFactory(dumpManager, systemClock)
@Test
- fun `create - always creates new instance`() {
+ fun create_alwaysCreatesNewInstance() {
val b1 = underTest.create(NAME_1, SIZE)
val b1_copy = underTest.create(NAME_1, SIZE)
val b2 = underTest.create(NAME_2, SIZE)
@@ -43,7 +43,7 @@ class TableLogBufferFactoryTest : SysuiTestCase() {
}
@Test
- fun `getOrCreate - reuses instance`() {
+ fun getOrCreate_reusesInstance() {
val b1 = underTest.getOrCreate(NAME_1, SIZE)
val b1_copy = underTest.getOrCreate(NAME_1, SIZE)
val b2 = underTest.getOrCreate(NAME_2, SIZE)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/data/repository/PowerRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/power/data/repository/PowerRepositoryImplTest.kt
index 249a91b0982a..bb3b3f709a7b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/power/data/repository/PowerRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/power/data/repository/PowerRepositoryImplTest.kt
@@ -66,7 +66,7 @@ class PowerRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - registers for broadcasts`() =
+ fun isInteractive_registersForBroadcasts() =
runBlocking(IMMEDIATE) {
val job = underTest.isInteractive.onEach {}.launchIn(this)
@@ -78,7 +78,7 @@ class PowerRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - unregisters from broadcasts`() =
+ fun isInteractive_unregistersFromBroadcasts() =
runBlocking(IMMEDIATE) {
val job = underTest.isInteractive.onEach {}.launchIn(this)
verifyRegistered()
@@ -89,7 +89,7 @@ class PowerRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - emits initial true value if screen was on`() =
+ fun isInteractive_emitsInitialTrueValueIfScreenWasOn() =
runBlocking(IMMEDIATE) {
isInteractive = true
var value: Boolean? = null
@@ -102,7 +102,7 @@ class PowerRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - emits initial false value if screen was off`() =
+ fun isInteractive_emitsInitialFalseValueIfScreenWasOff() =
runBlocking(IMMEDIATE) {
isInteractive = false
var value: Boolean? = null
@@ -115,7 +115,7 @@ class PowerRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - emits true when the screen turns on`() =
+ fun isInteractive_emitsTrueWhenTheScreenTurnsOn() =
runBlocking(IMMEDIATE) {
var value: Boolean? = null
val job = underTest.isInteractive.onEach { value = it }.launchIn(this)
@@ -129,7 +129,7 @@ class PowerRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - emits false when the screen turns off`() =
+ fun isInteractive_emitsFalseWhenTheScreenTurnsOff() =
runBlocking(IMMEDIATE) {
var value: Boolean? = null
val job = underTest.isInteractive.onEach { value = it }.launchIn(this)
@@ -143,7 +143,7 @@ class PowerRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - emits correctly over time`() =
+ fun isInteractive_emitsCorrectlyOverTime() =
runBlocking(IMMEDIATE) {
val values = mutableListOf<Boolean>()
val job = underTest.isInteractive.onEach(values::add).launchIn(this)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/power/domain/interactor/PowerInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/power/domain/interactor/PowerInteractorTest.kt
index bf6a37ec8eff..31d451227a9b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/power/domain/interactor/PowerInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/power/domain/interactor/PowerInteractorTest.kt
@@ -47,7 +47,7 @@ class PowerInteractorTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - screen turns off`() =
+ fun isInteractive_screenTurnsOff() =
runBlocking(IMMEDIATE) {
repository.setInteractive(true)
var value: Boolean? = null
@@ -60,7 +60,7 @@ class PowerInteractorTest : SysuiTestCase() {
}
@Test
- fun `isInteractive - becomes interactive`() =
+ fun isInteractive_becomesInteractive() =
runBlocking(IMMEDIATE) {
repository.setInteractive(false)
var value: Boolean? = null
diff --git a/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt
index 8cb5d31fff22..355c4b667333 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt
@@ -153,7 +153,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
}
@Test
- fun `WakefulnessLifecycle - dispatchFinishedWakingUp sets SysUI flag to AWAKE`() {
+ fun wakefulnessLifecycle_dispatchFinishedWakingUpSetsSysUIflagToAWAKE() {
// WakefulnessLifecycle is initialized to AWAKE initially, and won't emit a noop.
wakefulnessLifecycle.dispatchFinishedGoingToSleep()
clearInvocations(overviewProxy)
@@ -167,7 +167,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
}
@Test
- fun `WakefulnessLifecycle - dispatchStartedWakingUp sets SysUI flag to WAKING`() {
+ fun wakefulnessLifecycle_dispatchStartedWakingUpSetsSysUIflagToWAKING() {
wakefulnessLifecycle.dispatchStartedWakingUp(PowerManager.WAKE_REASON_UNKNOWN)
verify(overviewProxy)
@@ -177,7 +177,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
}
@Test
- fun `WakefulnessLifecycle - dispatchFinishedGoingToSleep sets SysUI flag to ASLEEP`() {
+ fun wakefulnessLifecycle_dispatchFinishedGoingToSleepSetsSysUIflagToASLEEP() {
wakefulnessLifecycle.dispatchFinishedGoingToSleep()
verify(overviewProxy)
@@ -187,7 +187,7 @@ class OverviewProxyServiceTest : SysuiTestCase() {
}
@Test
- fun `WakefulnessLifecycle - dispatchStartedGoingToSleep sets SysUI flag to GOING_TO_SLEEP`() {
+ fun wakefulnessLifecycle_dispatchStartedGoingToSleepSetsSysUIflagToGOING_TO_SLEEP() {
wakefulnessLifecycle.dispatchStartedGoingToSleep(
PowerManager.GO_TO_SLEEP_REASON_POWER_BUTTON
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt b/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt
index 57b6b2bd6fde..beb981d89735 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/settings/UserTrackerImplReceiveTest.kt
@@ -73,7 +73,7 @@ class UserTrackerImplReceiveTest : SysuiTestCase() {
}
@Test
- fun `calls callback and updates profiles when an intent received`() {
+ fun callsCallbackAndUpdatesProfilesWhenAnIntentReceived() {
tracker.initialize(0)
tracker.addCallback(callback, executor)
val profileID = tracker.userId + 10
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/QsBatteryModeControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/QsBatteryModeControllerTest.kt
index b547318a99b6..d421acac2daa 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/QsBatteryModeControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/QsBatteryModeControllerTest.kt
@@ -54,7 +54,7 @@ class QsBatteryModeControllerTest : SysuiTestCase() {
}
@Test
- fun `returns MODE_ON for qqs with center cutout`() {
+ fun returnsMODE_ONforQqsWithCenterCutout() {
assertThat(
controller.getBatteryMode(CENTER_TOP_CUTOUT, QQS_START_FRAME.prevFrameToFraction())
)
@@ -62,13 +62,13 @@ class QsBatteryModeControllerTest : SysuiTestCase() {
}
@Test
- fun `returns MODE_ESTIMATE for qs with center cutout`() {
+ fun returnsMODE_ESTIMATEforQsWithCenterCutout() {
assertThat(controller.getBatteryMode(CENTER_TOP_CUTOUT, QS_END_FRAME.nextFrameToFraction()))
.isEqualTo(BatteryMeterView.MODE_ESTIMATE)
}
@Test
- fun `returns MODE_ON for qqs with corner cutout`() {
+ fun returnsMODE_ONforQqsWithCornerCutout() {
whenever(insetsProvider.currentRotationHasCornerCutout()).thenReturn(true)
assertThat(
@@ -78,7 +78,7 @@ class QsBatteryModeControllerTest : SysuiTestCase() {
}
@Test
- fun `returns MODE_ESTIMATE for qs with corner cutout`() {
+ fun returnsMODE_ESTIMATEforQsWithCornerCutout() {
whenever(insetsProvider.currentRotationHasCornerCutout()).thenReturn(true)
assertThat(controller.getBatteryMode(CENTER_TOP_CUTOUT, QS_END_FRAME.nextFrameToFraction()))
@@ -86,7 +86,7 @@ class QsBatteryModeControllerTest : SysuiTestCase() {
}
@Test
- fun `returns null in-between`() {
+ fun returnsNullInBetween() {
assertThat(
controller.getBatteryMode(CENTER_TOP_CUTOUT, QQS_START_FRAME.nextFrameToFraction())
)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
index b043e97f1054..b19a78f0339b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeHeaderControllerTest.kt
@@ -357,7 +357,7 @@ class ShadeHeaderControllerTest : SysuiTestCase() {
}
@Test
- fun `battery mode controller called when qsExpandedFraction changes`() {
+ fun batteryModeControllerCalledWhenQsExpandedFractionChanges() {
whenever(qsBatteryModeController.getBatteryMode(Mockito.same(null), eq(0f)))
.thenReturn(BatteryMeterView.MODE_ON)
whenever(qsBatteryModeController.getBatteryMode(Mockito.same(null), eq(1f)))
@@ -816,7 +816,7 @@ class ShadeHeaderControllerTest : SysuiTestCase() {
}
@Test
- fun `carrier left padding is set when clock layout changes`() {
+ fun carrierLeftPaddingIsSetWhenClockLayoutChanges() {
val width = 200
whenever(clock.width).thenReturn(width)
whenever(clock.scaleX).thenReturn(2.57f) // 2.57 comes from qs_header.xml
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/model/SystemUiCarrierConfigTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/model/SystemUiCarrierConfigTest.kt
index 63cb30ca4a33..95b132d603dc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/model/SystemUiCarrierConfigTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/model/SystemUiCarrierConfigTest.kt
@@ -39,7 +39,7 @@ class SystemUiCarrierConfigTest : SysuiTestCase() {
}
@Test
- fun `process new config - reflected by isUsingDefault`() {
+ fun processNewConfig_reflectedByIsUsingDefault() {
// Starts out using the defaults
assertThat(underTest.isUsingDefault).isTrue()
@@ -50,7 +50,7 @@ class SystemUiCarrierConfigTest : SysuiTestCase() {
}
@Test
- fun `process new config - updates all flows`() {
+ fun processNewConfig_updatesAllFlows() {
assertThat(underTest.shouldInflateSignalStrength.value).isFalse()
assertThat(underTest.showOperatorNameInStatusBar.value).isFalse()
@@ -66,7 +66,7 @@ class SystemUiCarrierConfigTest : SysuiTestCase() {
}
@Test
- fun `process new config - defaults to false for config overrides`() {
+ fun processNewConfig_defaultsToFalseForConfigOverrides() {
// This case is only apparent when:
// 1. The default is true
// 2. The override config has no value for a given key
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/CarrierConfigRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/CarrierConfigRepositoryTest.kt
index dfef62e95eda..6e3af26121bf 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/CarrierConfigRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/CarrierConfigRepositoryTest.kt
@@ -96,7 +96,7 @@ class CarrierConfigRepositoryTest : SysuiTestCase() {
}
@Test
- fun `carrier config stream produces int-bundle pairs`() =
+ fun carrierConfigStreamProducesIntBundlePairs() =
testScope.runTest {
var latest: Pair<Int, PersistableBundle>? = null
val job = underTest.carrierConfigStream.onEach { latest = it }.launchIn(this)
@@ -111,7 +111,7 @@ class CarrierConfigRepositoryTest : SysuiTestCase() {
}
@Test
- fun `carrier config stream ignores invalid subscriptions`() =
+ fun carrierConfigStreamIgnoresInvalidSubscriptions() =
testScope.runTest {
var latest: Pair<Int, PersistableBundle>? = null
val job = underTest.carrierConfigStream.onEach { latest = it }.launchIn(this)
@@ -124,19 +124,19 @@ class CarrierConfigRepositoryTest : SysuiTestCase() {
}
@Test
- fun `getOrCreateConfig - uses default config if no override`() {
+ fun getOrCreateConfig_usesDefaultConfigIfNoOverride() {
val config = underTest.getOrCreateConfigForSubId(123)
assertThat(config.isUsingDefault).isTrue()
}
@Test
- fun `getOrCreateConfig - uses override if exists`() {
+ fun getOrCreateConfig_usesOverrideIfExists() {
val config = underTest.getOrCreateConfigForSubId(SUB_ID_1)
assertThat(config.isUsingDefault).isFalse()
}
@Test
- fun `config - updates while config stream is collected`() =
+ fun config_updatesWhileConfigStreamIsCollected() =
testScope.runTest {
CONFIG_1.putBoolean(CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL, false)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcherTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcherTest.kt
index 1fdcf7f27dbf..3ec96908dac8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcherTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileRepositorySwitcherTest.kt
@@ -156,7 +156,7 @@ class MobileRepositorySwitcherTest : SysuiTestCase() {
}
@Test
- fun `active repo matches demo mode setting`() =
+ fun activeRepoMatchesDemoModeSetting() =
runBlocking(IMMEDIATE) {
whenever(demoModeController.isInDemoMode).thenReturn(false)
@@ -177,7 +177,7 @@ class MobileRepositorySwitcherTest : SysuiTestCase() {
}
@Test
- fun `subscription list updates when demo mode changes`() =
+ fun subscriptionListUpdatesWhenDemoModeChanges() =
runBlocking(IMMEDIATE) {
whenever(demoModeController.isInDemoMode).thenReturn(false)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt
index 47f8cd319bff..1251dfacddfc 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionsRepositoryTest.kt
@@ -105,7 +105,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `network event - create new subscription`() =
+ fun networkEvent_createNewSubscription() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -121,7 +121,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `wifi carrier merged event - create new subscription`() =
+ fun wifiCarrierMergedEvent_createNewSubscription() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -137,7 +137,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `network event - reuses subscription when same Id`() =
+ fun networkEvent_reusesSubscriptionWhenSameId() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -159,7 +159,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `wifi carrier merged event - reuses subscription when same Id`() =
+ fun wifiCarrierMergedEvent_reusesSubscriptionWhenSameId() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -181,7 +181,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `multiple subscriptions`() =
+ fun multipleSubscriptions() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -195,7 +195,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `mobile subscription and carrier merged subscription`() =
+ fun mobileSubscriptionAndCarrierMergedSubscription() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -209,7 +209,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `multiple mobile subscriptions and carrier merged subscription`() =
+ fun multipleMobileSubscriptionsAndCarrierMergedSubscription() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -224,7 +224,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `mobile disabled event - disables connection - subId specified - single conn`() =
+ fun mobileDisabledEvent_disablesConnection_subIdSpecified_singleConn() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -239,7 +239,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `mobile disabled event - disables connection - subId not specified - single conn`() =
+ fun mobileDisabledEvent_disablesConnection_subIdNotSpecified_singleConn() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -254,7 +254,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `mobile disabled event - disables connection - subId specified - multiple conn`() =
+ fun mobileDisabledEvent_disablesConnection_subIdSpecified_multipleConn() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -270,7 +270,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `mobile disabled event - subId not specified - multiple conn - ignores command`() =
+ fun mobileDisabledEvent_subIdNotSpecified_multipleConn_ignoresCommand() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -286,7 +286,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `wifi network updates to disabled - carrier merged connection removed`() =
+ fun wifiNetworkUpdatesToDisabled_carrierMergedConnectionRemoved() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -303,7 +303,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `wifi network updates to active - carrier merged connection removed`() =
+ fun wifiNetworkUpdatesToActive_carrierMergedConnectionRemoved() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -326,7 +326,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `mobile sub updates to carrier merged - only one connection`() =
+ fun mobileSubUpdatesToCarrierMerged_onlyOneConnection() =
testScope.runTest {
var latestSubsList: List<SubscriptionModel>? = null
var connections: List<DemoMobileConnectionRepository>? = null
@@ -352,7 +352,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `mobile sub updates to carrier merged then back - has old mobile data`() =
+ fun mobileSubUpdatesToCarrierMergedThenBack_hasOldMobileData() =
testScope.runTest {
var latestSubsList: List<SubscriptionModel>? = null
var connections: List<DemoMobileConnectionRepository>? = null
@@ -393,7 +393,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
/** Regression test for b/261706421 */
@Test
- fun `multiple connections - remove all - does not throw`() =
+ fun multipleConnections_removeAll_doesNotThrow() =
testScope.runTest {
var latest: List<SubscriptionModel>? = null
val job = underTest.subscriptions.onEach { latest = it }.launchIn(this)
@@ -411,7 +411,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `demo connection - single subscription`() =
+ fun demoConnection_singleSubscription() =
testScope.runTest {
var currentEvent: FakeNetworkEventModel = validMobileEvent(subId = 1)
var connections: List<DemoMobileConnectionRepository>? = null
@@ -440,7 +440,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `demo connection - two connections - update second - no affect on first`() =
+ fun demoConnection_twoConnections_updateSecond_noAffectOnFirst() =
testScope.runTest {
var currentEvent1 = validMobileEvent(subId = 1)
var connection1: DemoMobileConnectionRepository? = null
@@ -487,7 +487,7 @@ class DemoMobileConnectionsRepositoryTest : SysuiTestCase() {
}
@Test
- fun `demo connection - two connections - update carrier merged - no affect on first`() =
+ fun demoConnection_twoConnections_updateCarrierMerged_noAffectOnFirst() =
testScope.runTest {
var currentEvent1 = validMobileEvent(subId = 1)
var connection1: DemoMobileConnectionRepository? = null
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt
index 423c47661fa3..9f77744e1fec 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt
@@ -292,7 +292,7 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() {
}
@Test
- fun `factory - reuses log buffers for same connection`() =
+ fun factory_reusesLogBuffersForSameConnection() =
testScope.runTest {
val realLoggerFactory = TableLogBufferFactory(mock(), FakeSystemClock())
@@ -327,7 +327,7 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() {
}
@Test
- fun `factory - reuses log buffers for same sub ID even if carrier merged`() =
+ fun factory_reusesLogBuffersForSameSubIDevenIfCarrierMerged() =
testScope.runTest {
val realLoggerFactory = TableLogBufferFactory(mock(), FakeSystemClock())
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
index 8d7f0f6035cc..c2768654809b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt
@@ -353,7 +353,7 @@ class MobileIconInteractorTest : SysuiTestCase() {
}
@Test
- fun `isInService - uses repository value`() =
+ fun isInService_usesRepositoryValue() =
testScope.runTest {
var latest: Boolean? = null
val job = underTest.isInService.onEach { latest = it }.launchIn(this)
@@ -370,7 +370,7 @@ class MobileIconInteractorTest : SysuiTestCase() {
}
@Test
- fun `roaming - is gsm - uses connection model`() =
+ fun roaming_isGsm_usesConnectionModel() =
testScope.runTest {
var latest: Boolean? = null
val job = underTest.isRoaming.onEach { latest = it }.launchIn(this)
@@ -389,7 +389,7 @@ class MobileIconInteractorTest : SysuiTestCase() {
}
@Test
- fun `roaming - is cdma - uses cdma roaming bit`() =
+ fun roaming_isCdma_usesCdmaRoamingBit() =
testScope.runTest {
var latest: Boolean? = null
val job = underTest.isRoaming.onEach { latest = it }.launchIn(this)
@@ -410,7 +410,7 @@ class MobileIconInteractorTest : SysuiTestCase() {
}
@Test
- fun `roaming - false while carrierNetworkChangeActive`() =
+ fun roaming_falseWhileCarrierNetworkChangeActive() =
testScope.runTest {
var latest: Boolean? = null
val job = underTest.isRoaming.onEach { latest = it }.launchIn(this)
@@ -431,7 +431,7 @@ class MobileIconInteractorTest : SysuiTestCase() {
}
@Test
- fun `network name - uses operatorAlphaShot when non null and repo is default`() =
+ fun networkName_usesOperatorAlphaShotWhenNonNullAndRepoIsDefault() =
testScope.runTest {
var latest: NetworkNameModel? = null
val job = underTest.networkName.onEach { latest = it }.launchIn(this)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt
index dc683868f727..c84c9c032225 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt
@@ -520,7 +520,7 @@ class MobileIconsInteractorTest : SysuiTestCase() {
// is private and can only be tested by looking at [isDefaultConnectionFailed].
@Test
- fun `data switch - in same group - validated matches previous value - expires after 2s`() =
+ fun dataSwitch_inSameGroup_validatedMatchesPreviousValue_expiresAfter2s() =
testScope.runTest {
var latestConnectionFailed: Boolean? = null
val job =
@@ -548,7 +548,7 @@ class MobileIconsInteractorTest : SysuiTestCase() {
}
@Test
- fun `data switch - in same group - not validated - immediately marked as failed`() =
+ fun dataSwitch_inSameGroup_notValidated_immediatelyMarkedAsFailed() =
testScope.runTest {
var latestConnectionFailed: Boolean? = null
val job =
@@ -567,7 +567,7 @@ class MobileIconsInteractorTest : SysuiTestCase() {
}
@Test
- fun `data switch - lose validation - then switch happens - clears forced bit`() =
+ fun dataSwitch_loseValidation_thenSwitchHappens_clearsForcedBit() =
testScope.runTest {
var latestConnectionFailed: Boolean? = null
val job =
@@ -602,7 +602,7 @@ class MobileIconsInteractorTest : SysuiTestCase() {
}
@Test
- fun `data switch - while already forcing validation - resets clock`() =
+ fun dataSwitch_whileAlreadyForcingValidation_resetsClock() =
testScope.runTest {
var latestConnectionFailed: Boolean? = null
val job =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/LocationBasedMobileIconViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/LocationBasedMobileIconViewModelTest.kt
index e99be864e73f..d5fb5776b344 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/LocationBasedMobileIconViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/LocationBasedMobileIconViewModelTest.kt
@@ -92,7 +92,7 @@ class LocationBasedMobileIconViewModelTest : SysuiTestCase() {
}
@Test
- fun `location based view models receive same icon id when common impl updates`() =
+ fun locationBasedViewModelsReceiveSameIconIdWhenCommonImplUpdates() =
testScope.runTest {
var latestHome: SignalIconModel? = null
val homeJob = homeIcon.icon.onEach { latestHome = it }.launchIn(this)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
index 297cb9d691ba..2b7bc780f7c7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModelTest.kt
@@ -249,7 +249,7 @@ class MobileIconViewModelTest : SysuiTestCase() {
}
@Test
- fun `icon - uses empty state - when not in service`() =
+ fun icon_usesEmptyState_whenNotInService() =
testScope.runTest {
var latest: SignalIconModel? = null
val job = underTest.icon.onEach { latest = it }.launchIn(this)
@@ -480,7 +480,7 @@ class MobileIconViewModelTest : SysuiTestCase() {
}
@Test
- fun `network type - alwaysShow - shown when not default`() =
+ fun networkType_alwaysShow_shownWhenNotDefault() =
testScope.runTest {
interactor.networkTypeIconGroup.value = NetworkTypeIconModel.DefaultIcon(THREE_G)
interactor.mobileIsDefault.value = false
@@ -500,7 +500,7 @@ class MobileIconViewModelTest : SysuiTestCase() {
}
@Test
- fun `network type - not shown when not default`() =
+ fun networkType_notShownWhenNotDefault() =
testScope.runTest {
interactor.networkTypeIconGroup.value = NetworkTypeIconModel.DefaultIcon(THREE_G)
interactor.isDataConnected.value = true
@@ -531,7 +531,7 @@ class MobileIconViewModelTest : SysuiTestCase() {
}
@Test
- fun `data activity - null when config is off`() =
+ fun dataActivity_nullWhenConfigIsOff() =
testScope.runTest {
// Create a new view model here so the constants are properly read
whenever(constants.shouldShowActivityConfig).thenReturn(false)
@@ -563,7 +563,7 @@ class MobileIconViewModelTest : SysuiTestCase() {
}
@Test
- fun `data activity - config on - test indicators`() =
+ fun dataActivity_configOn_testIndicators() =
testScope.runTest {
// Create a new view model here so the constants are properly read
whenever(constants.shouldShowActivityConfig).thenReturn(true)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconsViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconsViewModelTest.kt
index 01bec879102d..f985fb7c8f8a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconsViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconsViewModelTest.kt
@@ -109,7 +109,7 @@ class MobileIconsViewModelTest : SysuiTestCase() {
}
@Test
- fun `caching - mobile icon view model is reused for same sub id`() =
+ fun caching_mobileIconViewModelIsReusedForSameSubId() =
testScope.runTest {
val model1 = underTest.viewModelForSub(1, StatusBarLocation.HOME)
val model2 = underTest.viewModelForSub(1, StatusBarLocation.QS)
@@ -118,7 +118,7 @@ class MobileIconsViewModelTest : SysuiTestCase() {
}
@Test
- fun `caching - invalid view models are removed from cache when sub disappears`() =
+ fun caching_invalidViewModelsAreRemovedFromCacheWhenSubDisappears() =
testScope.runTest {
// Retrieve models to trigger caching
val model1 = underTest.viewModelForSub(1, StatusBarLocation.HOME)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcherTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcherTest.kt
index 70d2d2b68460..30b95ef3b205 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcherTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcherTest.kt
@@ -105,7 +105,7 @@ class WifiRepositorySwitcherTest : SysuiTestCase() {
}
@Test
- fun `switcher active repo - updates when demo mode changes`() =
+ fun switcherActiveRepo_updatesWhenDemoModeChanges() =
testScope.runTest {
assertThat(underTest.activeRepo.value).isSameInstanceAs(realImpl)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BaseUserSwitcherAdapterTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BaseUserSwitcherAdapterTest.kt
index 0a3da0b5b029..67727ae21641 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BaseUserSwitcherAdapterTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BaseUserSwitcherAdapterTest.kt
@@ -87,7 +87,7 @@ class BaseUserSwitcherAdapterTest : SysuiTestCase() {
}
@Test
- fun `Adds self to controller in constructor`() {
+ fun addsSelfToControllerInConstructor() {
val captor = kotlinArgumentCaptor<WeakReference<BaseUserSwitcherAdapter>>()
verify(controller).addAdapter(captor.capture())
@@ -100,7 +100,7 @@ class BaseUserSwitcherAdapterTest : SysuiTestCase() {
}
@Test
- fun `count - ignores restricted users when device is locked`() {
+ fun count_ignoresRestrictedUsersWhenDeviceIsLocked() {
whenever(controller.isKeyguardShowing).thenReturn(true)
users =
ArrayList(
@@ -131,7 +131,7 @@ class BaseUserSwitcherAdapterTest : SysuiTestCase() {
}
@Test
- fun `count - does not ignore restricted users when device is not locked`() {
+ fun count_doesNotIgnoreRestrictedUsersWhenDeviceIsNotLocked() {
whenever(controller.isKeyguardShowing).thenReturn(false)
users =
ArrayList(
@@ -185,7 +185,7 @@ class BaseUserSwitcherAdapterTest : SysuiTestCase() {
}
@Test
- fun `getName - non guest - returns real name`() {
+ fun getName_nonGuest_returnsRealName() {
val userRecord =
createUserRecord(
id = 1,
@@ -196,7 +196,7 @@ class BaseUserSwitcherAdapterTest : SysuiTestCase() {
}
@Test
- fun `getName - guest and selected - returns exit guest action name`() {
+ fun getName_guestAndSelected_returnsExitGuestActionName() {
val expected = "Exit guest"
context.orCreateTestableResources.addOverride(
com.android.settingslib.R.string.guest_exit_quick_settings_button,
@@ -215,7 +215,7 @@ class BaseUserSwitcherAdapterTest : SysuiTestCase() {
}
@Test
- fun `getName - guest and not selected - returns enter guest action name`() {
+ fun getName_guestAndNotSelected_returnsEnterGuestActionName() {
val expected = "Guest"
context.orCreateTestableResources.addOverride(
com.android.internal.R.string.guest_name,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/user/data/repository/UserRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/user/data/repository/UserRepositoryImplTest.kt
index e2f3cf7e085f..079fbcd0304c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/user/data/repository/UserRepositoryImplTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/user/data/repository/UserRepositoryImplTest.kt
@@ -164,7 +164,7 @@ class UserRepositoryImplTest : SysuiTestCase() {
}
@Test
- fun `refreshUsers - sorts by creation time - guest user last`() = runSelfCancelingTest {
+ fun refreshUsers_sortsByCreationTime_guestUserLast() = runSelfCancelingTest {
underTest = create(this)
val unsortedUsers =
setUpUsers(
@@ -205,7 +205,7 @@ class UserRepositoryImplTest : SysuiTestCase() {
return userInfos
}
@Test
- fun `userTrackerCallback - updates selectedUserInfo`() = runSelfCancelingTest {
+ fun userTrackerCallback_updatesSelectedUserInfo() = runSelfCancelingTest {
underTest = create(this)
var selectedUserInfo: UserInfo? = null
underTest.selectedUserInfo.onEach { selectedUserInfo = it }.launchIn(this)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/GuestUserInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/GuestUserInteractorTest.kt
index 0c119fd90c23..948670f95f97 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/GuestUserInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/GuestUserInteractorTest.kt
@@ -97,13 +97,13 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `registers broadcast receivers`() {
+ fun registersBroadcastReceivers() {
verify(resumeSessionReceiver).register()
verify(resetOrExitSessionReceiver).register()
}
@Test
- fun `onDeviceBootCompleted - allowed to add - create guest`() =
+ fun onDeviceBootCompleted_allowedToAdd_createGuest() =
runBlocking(IMMEDIATE) {
setAllowedToAdd()
@@ -114,7 +114,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `onDeviceBootCompleted - await provisioning - and create guest`() =
+ fun onDeviceBootCompleted_awaitProvisioning_andCreateGuest() =
runBlocking(IMMEDIATE) {
setAllowedToAdd(isAllowed = false)
underTest.onDeviceBootCompleted()
@@ -145,7 +145,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `createAndSwitchTo - fails to create - does not switch to`() =
+ fun createAndSwitchTo_failsToCreate_doesNotSwitchTo() =
runBlocking(IMMEDIATE) {
whenever(manager.createGuest(any())).thenReturn(null)
@@ -162,7 +162,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `exit - returns to target user`() =
+ fun exit_returnsToTargetUser() =
runBlocking(IMMEDIATE) {
repository.setSelectedUserInfo(GUEST_USER_INFO)
@@ -182,7 +182,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `exit - returns to last non-guest`() =
+ fun exit_returnsToLastNonGuest() =
runBlocking(IMMEDIATE) {
val expectedUserId = NON_GUEST_USER_INFO.id
whenever(manager.getUserInfo(expectedUserId)).thenReturn(NON_GUEST_USER_INFO)
@@ -204,7 +204,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `exit - last non-guest was removed - returns to main user`() =
+ fun exit_lastNonGuestWasRemoved_returnsToMainUser() =
runBlocking(IMMEDIATE) {
val removedUserId = 310
val mainUserId = 10
@@ -227,7 +227,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `exit - guest was ephemeral - it is removed`() =
+ fun exit_guestWasEphemeral_itIsRemoved() =
runBlocking(IMMEDIATE) {
whenever(manager.markGuestForDeletion(anyInt())).thenReturn(true)
repository.setUserInfos(listOf(NON_GUEST_USER_INFO, EPHEMERAL_GUEST_USER_INFO))
@@ -250,7 +250,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `exit - force remove guest - it is removed`() =
+ fun exit_forceRemoveGuest_itIsRemoved() =
runBlocking(IMMEDIATE) {
whenever(manager.markGuestForDeletion(anyInt())).thenReturn(true)
repository.setSelectedUserInfo(GUEST_USER_INFO)
@@ -272,7 +272,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `exit - selected different from guest user - do nothing`() =
+ fun exit_selectedDifferentFromGuestUser_doNothing() =
runBlocking(IMMEDIATE) {
repository.setSelectedUserInfo(NON_GUEST_USER_INFO)
@@ -289,7 +289,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `exit - selected is actually not a guest user - do nothing`() =
+ fun exit_selectedIsActuallyNotAguestUser_doNothing() =
runBlocking(IMMEDIATE) {
repository.setSelectedUserInfo(NON_GUEST_USER_INFO)
@@ -306,7 +306,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `remove - returns to target user`() =
+ fun remove_returnsToTargetUser() =
runBlocking(IMMEDIATE) {
whenever(manager.markGuestForDeletion(anyInt())).thenReturn(true)
repository.setSelectedUserInfo(GUEST_USER_INFO)
@@ -327,7 +327,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `remove - selected different from guest user - do nothing`() =
+ fun remove_selectedDifferentFromGuestUser_doNothing() =
runBlocking(IMMEDIATE) {
whenever(manager.markGuestForDeletion(anyInt())).thenReturn(true)
repository.setSelectedUserInfo(NON_GUEST_USER_INFO)
@@ -344,7 +344,7 @@ class GuestUserInteractorTest : SysuiTestCase() {
}
@Test
- fun `remove - selected is actually not a guest user - do nothing`() =
+ fun remove_selectedIsActuallyNotAguestUser_doNothing() =
runBlocking(IMMEDIATE) {
whenever(manager.markGuestForDeletion(anyInt())).thenReturn(true)
repository.setSelectedUserInfo(NON_GUEST_USER_INFO)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerTest.kt
index 593ce1f0a2f5..b30f77a663af 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/RefreshUsersSchedulerTest.kt
@@ -45,7 +45,7 @@ class RefreshUsersSchedulerTest : SysuiTestCase() {
}
@Test
- fun `pause - prevents the next refresh from happening`() =
+ fun pause_preventsTheNextRefreshFromHappening() =
runBlocking(IMMEDIATE) {
underTest =
RefreshUsersScheduler(
@@ -60,7 +60,7 @@ class RefreshUsersSchedulerTest : SysuiTestCase() {
}
@Test
- fun `unpauseAndRefresh - forces the refresh even when paused`() =
+ fun unpauseAndRefresh_forcesTheRefreshEvenWhenPaused() =
runBlocking(IMMEDIATE) {
underTest =
RefreshUsersScheduler(
@@ -76,7 +76,7 @@ class RefreshUsersSchedulerTest : SysuiTestCase() {
}
@Test
- fun `refreshIfNotPaused - refreshes when not paused`() =
+ fun refreshIfNotPaused_refreshesWhenNotPaused() =
runBlocking(IMMEDIATE) {
underTest =
RefreshUsersScheduler(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/UserInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/UserInteractorTest.kt
index adba53823d2c..d252d5317d06 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/UserInteractorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/user/domain/interactor/UserInteractorTest.kt
@@ -182,7 +182,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `testKeyguardUpdateMonitor_onKeyguardGoingAway`() =
+ fun testKeyguardUpdateMonitor_onKeyguardGoingAway() =
testScope.runTest {
val argumentCaptor = ArgumentCaptor.forClass(KeyguardUpdateMonitorCallback::class.java)
verify(keyguardUpdateMonitor).registerCallback(argumentCaptor.capture())
@@ -194,7 +194,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `onRecordSelected - user`() =
+ fun onRecordSelected_user() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -211,7 +211,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `onRecordSelected - switch to guest user`() =
+ fun onRecordSelected_switchToGuestUser() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = true)
userRepository.setUserInfos(userInfos)
@@ -227,7 +227,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `onRecordSelected - switch to restricted user`() =
+ fun onRecordSelected_switchToRestrictedUser() =
testScope.runTest {
var userInfos = createUserInfos(count = 2, includeGuest = false).toMutableList()
userInfos.add(
@@ -252,7 +252,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `onRecordSelected - enter guest mode`() =
+ fun onRecordSelected_enterGuestMode() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -272,7 +272,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `onRecordSelected - action`() =
+ fun onRecordSelected_action() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = true)
userRepository.setUserInfos(userInfos)
@@ -288,7 +288,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `users - switcher enabled`() =
+ fun users_switcherEnabled() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = true)
userRepository.setUserInfos(userInfos)
@@ -301,7 +301,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `users - switches to second user`() =
+ fun users_switchesToSecondUser() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -315,7 +315,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `users - switcher not enabled`() =
+ fun users_switcherNotEnabled() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -342,7 +342,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `actions - device unlocked`() =
+ fun actions_deviceUnlocked() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
@@ -366,7 +366,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `actions - device unlocked - full screen`() =
+ fun actions_deviceUnlocked_fullScreen() =
testScope.runTest {
featureFlags.set(Flags.FULL_SCREEN_USER_SWITCHER, true)
val userInfos = createUserInfos(count = 2, includeGuest = false)
@@ -389,7 +389,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `actions - device unlocked user not primary - empty list`() =
+ fun actions_deviceUnlockedUserNotPrimary_emptyList() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -402,7 +402,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `actions - device unlocked user is guest - empty list`() =
+ fun actions_deviceUnlockedUserIsGuest_emptyList() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = true)
assertThat(userInfos[1].isGuest).isTrue()
@@ -416,7 +416,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `actions - device locked add from lockscreen set - full list`() =
+ fun actions_deviceLockedAddFromLockscreenSet_fullList() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -442,7 +442,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `actions - device locked add from lockscreen set - full list - full screen`() =
+ fun actions_deviceLockedAddFromLockscreenSet_fullList_fullScreen() =
testScope.runTest {
featureFlags.set(Flags.FULL_SCREEN_USER_SWITCHER, true)
val userInfos = createUserInfos(count = 2, includeGuest = false)
@@ -469,7 +469,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `actions - device locked - only manage user is shown`() =
+ fun actions_deviceLocked_onlymanageUserIsShown() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -482,7 +482,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `executeAction - add user - dialog shown`() =
+ fun executeAction_addUser_dialogShown() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -509,7 +509,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `executeAction - add supervised user - dismisses dialog and starts activity`() =
+ fun executeAction_addSupervisedUser_dismissesDialogAndStartsActivity() =
testScope.runTest {
underTest.executeAction(UserActionModel.ADD_SUPERVISED_USER)
@@ -523,7 +523,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `executeAction - navigate to manage users`() =
+ fun executeAction_navigateToManageUsers() =
testScope.runTest {
underTest.executeAction(UserActionModel.NAVIGATE_TO_USER_MANAGEMENT)
@@ -533,7 +533,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `executeAction - guest mode`() =
+ fun executeAction_guestMode() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -571,7 +571,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `selectUser - already selected guest re-selected - exit guest dialog`() =
+ fun selectUser_alreadySelectedGuestReSelected_exitGuestDialog() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = true)
val guestUserInfo = userInfos[1]
@@ -592,7 +592,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `selectUser - currently guest non-guest selected - exit guest dialog`() =
+ fun selectUser_currentlyGuestNonGuestSelected_exitGuestDialog() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = true)
val guestUserInfo = userInfos[1]
@@ -610,7 +610,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `selectUser - not currently guest - switches users`() =
+ fun selectUser_notCurrentlyGuest_switchesUsers() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -626,7 +626,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `Telephony call state changes - refreshes users`() =
+ fun telephonyCallStateChanges_refreshesUsers() =
testScope.runTest {
runCurrent()
@@ -639,7 +639,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `User switched broadcast`() =
+ fun userSwitchedBroadcast() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -670,7 +670,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `User info changed broadcast`() =
+ fun userInfoChangedBroadcast() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -690,7 +690,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `System user unlocked broadcast - refresh users`() =
+ fun systemUserUnlockedBroadcast_refreshUsers() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -710,7 +710,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `Non-system user unlocked broadcast - do not refresh users`() =
+ fun nonSystemUserUnlockedBroadcast_doNotRefreshUsers() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
@@ -799,7 +799,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `users - secondary user - guest user can be switched to`() =
+ fun users_secondaryUser_guestUserCanBeSwitchedTo() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = true)
userRepository.setUserInfos(userInfos)
@@ -812,7 +812,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `users - secondary user - no guest action`() =
+ fun users_secondaryUser_noGuestAction() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = true)
userRepository.setUserInfos(userInfos)
@@ -824,7 +824,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `users - secondary user - no guest user record`() =
+ fun users_secondaryUser_noGuestUserRecord() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = true)
userRepository.setUserInfos(userInfos)
@@ -835,7 +835,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `show user switcher - full screen disabled - shows dialog switcher`() =
+ fun showUserSwitcher_fullScreenDisabled_showsDialogSwitcher() =
testScope.runTest {
val expandable = mock<Expandable>()
underTest.showUserSwitcher(expandable)
@@ -851,7 +851,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `show user switcher - full screen enabled - launches full screen dialog`() =
+ fun showUserSwitcher_fullScreenEnabled_launchesFullScreenDialog() =
testScope.runTest {
featureFlags.set(Flags.FULL_SCREEN_USER_SWITCHER, true)
@@ -869,7 +869,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `users - secondary user - managed profile is not included`() =
+ fun users_secondaryUser_managedProfileIsNotIncluded() =
testScope.runTest {
val userInfos = createUserInfos(count = 3, includeGuest = false).toMutableList()
userInfos.add(
@@ -889,7 +889,7 @@ class UserInteractorTest : SysuiTestCase() {
}
@Test
- fun `current user is not primary and user switcher is disabled`() =
+ fun currentUserIsNotPrimaryAndUserSwitcherIsDisabled() =
testScope.runTest {
val userInfos = createUserInfos(count = 2, includeGuest = false)
userRepository.setUserInfos(userInfos)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/StatusBarUserChipViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/StatusBarUserChipViewModelTest.kt
index 9b74c1f05d71..fd8c6c76720b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/StatusBarUserChipViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/StatusBarUserChipViewModelTest.kt
@@ -137,7 +137,7 @@ class StatusBarUserChipViewModelTest : SysuiTestCase() {
}
@Test
- fun `config is false - chip is disabled`() {
+ fun configIsFalse_chipIsDisabled() {
// the enabled bit is set at SystemUI startup, so recreate the view model here
userRepository.isStatusBarUserChipEnabled = false
underTest = viewModel()
@@ -146,7 +146,7 @@ class StatusBarUserChipViewModelTest : SysuiTestCase() {
}
@Test
- fun `config is true - chip is enabled`() {
+ fun configIsTrue_chipIsEnabled() {
// the enabled bit is set at SystemUI startup, so recreate the view model here
userRepository.isStatusBarUserChipEnabled = true
underTest = viewModel()
@@ -155,7 +155,7 @@ class StatusBarUserChipViewModelTest : SysuiTestCase() {
}
@Test
- fun `should show chip criteria - single user`() =
+ fun shouldShowChipCriteria_singleUser() =
testScope.runTest {
userRepository.setUserInfos(listOf(USER_0))
userRepository.setSelectedUserInfo(USER_0)
@@ -172,7 +172,7 @@ class StatusBarUserChipViewModelTest : SysuiTestCase() {
}
@Test
- fun `should show chip criteria - multiple users`() =
+ fun shouldShowChipCriteria_multipleUsers() =
testScope.runTest {
setMultipleUsers()
@@ -186,7 +186,7 @@ class StatusBarUserChipViewModelTest : SysuiTestCase() {
}
@Test
- fun `user chip name - shows selected user info`() =
+ fun userChipName_showsSelectedUserInfo() =
testScope.runTest {
setMultipleUsers()
@@ -206,7 +206,7 @@ class StatusBarUserChipViewModelTest : SysuiTestCase() {
}
@Test
- fun `user chip avatar - shows selected user info`() =
+ fun userChipAvatar_showsSelectedUserInfo() =
testScope.runTest {
setMultipleUsers()
diff --git a/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModelTest.kt
index a342dadcb775..91550844ceca 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModelTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/user/ui/viewmodel/UserSwitcherViewModelTest.kt
@@ -232,7 +232,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `maximumUserColumns - few users`() =
+ fun maximumUserColumns_fewUsers() =
testScope.runTest {
setUsers(count = 2)
val values = mutableListOf<Int>()
@@ -244,7 +244,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `maximumUserColumns - many users`() =
+ fun maximumUserColumns_manyUsers() =
testScope.runTest {
setUsers(count = 5)
val values = mutableListOf<Int>()
@@ -255,7 +255,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `isOpenMenuButtonVisible - has actions - true`() =
+ fun isOpenMenuButtonVisible_hasActions_true() =
testScope.runTest {
setUsers(2)
@@ -267,7 +267,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `isOpenMenuButtonVisible - no actions - false`() =
+ fun isOpenMenuButtonVisible_noActions_false() =
testScope.runTest {
val userInfos = setUsers(2)
userRepository.setSelectedUserInfo(userInfos[1])
@@ -298,7 +298,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `menu actions`() =
+ fun menuActions() =
testScope.runTest {
setUsers(2)
val actions = mutableListOf<List<UserActionViewModel>>()
@@ -318,7 +318,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `isFinishRequested - finishes when cancel button is clicked`() =
+ fun isFinishRequested_finishesWhenCancelButtonIsClicked() =
testScope.runTest {
setUsers(count = 2)
val isFinishRequested = mutableListOf<Boolean>()
@@ -338,7 +338,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `guest selected -- name is exit guest`() =
+ fun guestSelected_nameIsExitGuest() =
testScope.runTest {
val userInfos =
listOf(
@@ -386,7 +386,7 @@ class UserSwitcherViewModelTest : SysuiTestCase() {
}
@Test
- fun `guest not selected -- name is guest`() =
+ fun guestNotSelected_nameIsGuest() =
testScope.runTest {
val userInfos =
listOf(
diff --git a/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualSuggestionsControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualSuggestionsControllerTest.kt
index 9bd3a799350d..3901d720ab3a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualSuggestionsControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/wallet/controller/WalletContextualSuggestionsControllerTest.kt
@@ -93,7 +93,7 @@ class WalletContextualSuggestionsControllerTest : SysuiTestCase() {
}
@Test
- fun `state - has wallet cards- callbacks called`() = runTest {
+ fun state_hasWalletCardsCallbacksCalled() = runTest {
setUpWalletClient(listOf(CARD_1, CARD_2, PAYMENT_CARD))
val controller = createWalletContextualSuggestionsController(backgroundScope)
var latest1 = emptyList<WalletCard>()
@@ -115,7 +115,7 @@ class WalletContextualSuggestionsControllerTest : SysuiTestCase() {
}
@Test
- fun `state - no wallet cards - set suggestion cards`() = runTest {
+ fun state_noWalletCards_setSuggestionCards() = runTest {
setUpWalletClient(emptyList())
val controller = createWalletContextualSuggestionsController(backgroundScope)
val latest =
@@ -132,7 +132,7 @@ class WalletContextualSuggestionsControllerTest : SysuiTestCase() {
}
@Test
- fun `state - has wallet cards - set and update suggestion cards`() = runTest {
+ fun state_hasWalletCards_setAndUpdateSuggestionCards() = runTest {
setUpWalletClient(listOf(CARD_1, CARD_2, PAYMENT_CARD))
val controller = createWalletContextualSuggestionsController(backgroundScope)
val latest =
@@ -151,7 +151,7 @@ class WalletContextualSuggestionsControllerTest : SysuiTestCase() {
}
@Test
- fun `state - wallet cards error`() = runTest {
+ fun state_walletCardsError() = runTest {
setUpWalletClient(shouldFail = true)
val controller = createWalletContextualSuggestionsController(backgroundScope)
val latest =
@@ -167,7 +167,7 @@ class WalletContextualSuggestionsControllerTest : SysuiTestCase() {
}
@Test
- fun `state - has wallet cards - received contextual cards - feature disabled`() = runTest {
+ fun state_hasWalletCards_receivedContextualCards_featureDisabled() = runTest {
whenever(featureFlags.isEnabled(eq(Flags.ENABLE_WALLET_CONTEXTUAL_LOYALTY_CARDS)))
.thenReturn(false)
setUpWalletClient(listOf(CARD_1, CARD_2, PAYMENT_CARD))