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

Commit 1e134572 authored by Jacky Wang's avatar Jacky Wang
Browse files

Rename CatalystScreenTestCase.context

Bug: 370394101
Flag: EXEMPT test
Test: N/A
Change-Id: Icfe546154a079f24a75455d25d128d5e550162cd
parent 2f80653a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@ class DisplayScreenTest : CatalystScreenTestCase() {

    private val mockResources = mock<Resources>()

    private val contextWrapper =
        object : ContextWrapper(context) {
    private val context =
        object : ContextWrapper(appContext) {
            override fun getResources(): Resources = mockResources
        }

@@ -56,14 +56,14 @@ class DisplayScreenTest : CatalystScreenTestCase() {
    fun isAvailable_configTrue_shouldReturnTrue() {
        mockResources.stub { on { getBoolean(anyInt()) } doReturn true }

        assertThat(preferenceScreenCreator.isAvailable(contextWrapper)).isTrue()
        assertThat(preferenceScreenCreator.isAvailable(context)).isTrue()
    }

    @Test
    fun isAvailable_configFalse_shouldReturnFalse() {
        mockResources.stub { on { getBoolean(anyInt()) } doReturn false }

        assertThat(preferenceScreenCreator.isAvailable(contextWrapper)).isFalse()
        assertThat(preferenceScreenCreator.isAvailable(context)).isFalse()
    }

    override fun migration() {