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

Commit 4e63163e authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Modernize CallChipInteractorTest to use Kosmos.Fixture.

This fixes the following error that was happening in presubmit of
If87ed36db184de274587f3d57ad7264c80f1febc:
> FlagSetException: Flag android.app.ui_rich_ongoing set error: This flag was locked when it was read outside of the test code

Fixes: 416338826
Flag: TEST_ONLY
Test: CallChipInteractorTest
Change-Id: I5a37e91523b45fda3e799a5b2ce495141bfc15d2
parent c9309197
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@ import android.platform.test.annotations.EnableFlags
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.SysuiTestCase
import com.android.systemui.kosmos.Kosmos
import com.android.systemui.kosmos.collectLastValue
import com.android.systemui.kosmos.collectLastValue
import com.android.systemui.kosmos.runTest
import com.android.systemui.kosmos.runTest
import com.android.systemui.kosmos.useUnconfinedTestDispatcher
import com.android.systemui.kosmos.useUnconfinedTestDispatcher
@@ -37,10 +38,10 @@ import org.junit.runner.RunWith
@SmallTest
@SmallTest
@RunWith(AndroidJUnit4::class)
@RunWith(AndroidJUnit4::class)
class CallChipInteractorTest : SysuiTestCase() {
class CallChipInteractorTest : SysuiTestCase() {
    val kosmos = testKosmos().useUnconfinedTestDispatcher()
    private val kosmos = testKosmos().useUnconfinedTestDispatcher()
    val repo = kosmos.ongoingCallRepository
    private val Kosmos.repo by Kosmos.Fixture { kosmos.ongoingCallRepository }


    val underTest = kosmos.callChipInteractor
    private val Kosmos.underTest by Kosmos.Fixture { kosmos.callChipInteractor }


    @Test
    @Test
    fun ongoingCallState_noCall_isNoCall() =
    fun ongoingCallState_noCall_isNoCall() =