Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb18a076 authored by David Saff's avatar David Saff
Browse files

Do not use mockito during class initialization

go/no-mockito-during-class-initialization

Bug: 391948934
Test: presubmit
Flag: TEST_ONLY
Change-Id: I4a2ee0ed6469695832f727aae62254f233639044
parent 26e7ca51
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -88,11 +88,6 @@ class KeyguardQuickAffordanceInteractorSceneContainerTest : SysuiTestCase() {

    companion object {
        private val INTENT = Intent("some.intent.action")
        private val DRAWABLE =
            mock<Icon> {
                whenever(this.contentDescription)
                    .thenReturn(ContentDescription.Resource(res = CONTENT_DESCRIPTION_RESOURCE_ID))
            }
        private const val CONTENT_DESCRIPTION_RESOURCE_ID = 1337

        @Parameters(
@@ -337,7 +332,17 @@ class KeyguardQuickAffordanceInteractorSceneContainerTest : SysuiTestCase() {

            homeControls.setState(
                lockScreenState =
                    KeyguardQuickAffordanceConfig.LockScreenState.Visible(icon = DRAWABLE)
                    KeyguardQuickAffordanceConfig.LockScreenState.Visible(
                        icon =
                            mock<Icon> {
                                whenever(contentDescription)
                                    .thenReturn(
                                        ContentDescription.Resource(
                                            res = CONTENT_DESCRIPTION_RESOURCE_ID
                                        )
                                    )
                            }
                    )
            )
            homeControls.onTriggeredResult =
                if (startActivity) {