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

Commit 03107303 authored by Hakjun Choi's avatar Hakjun Choi Committed by Android (Google) Code Review
Browse files

Merge "Reflect API change of SatelliteManager to unit test" into main

parents ca876884 a8b02d5f
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -124,22 +124,6 @@ class DeviceBasedSatelliteRepositoryImplTest : SysuiTestCase() {
            assertThat(underTest.satelliteSupport.value).isEqualTo(SatelliteSupport.NotSupported)
        }

    @Test
    fun satelliteManagerThrows_doesNotCrash() =
        testScope.runTest {
            setupDefaultRepo()

            whenever(satelliteManager.registerForNtnSignalStrengthChanged(any(), any()))
                .thenThrow(SatelliteException(13))

            val conn by collectLastValue(underTest.connectionState)
            val strength by collectLastValue(underTest.signalStrength)

            // Flows have not emitted, we haven't crashed
            assertThat(conn).isNull()
            assertThat(strength).isNull()
        }

    @Test
    fun connectionState_mapsFromSatelliteModemState() =
        testScope.runTest {