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

Commit a8b02d5f authored by Hakjun Choi's avatar Hakjun Choi
Browse files

Reflect API change of SatelliteManager to unit test

Reflected API change which bocome not to throw SatelliteException

Bug: 322132989
Flag: NONE
Test: atest DeviceBasedSatelliteRepositoryImplTest
Change-Id: I7037b4d5c0a7e762d0bd1e30a37ec06d4767656d
parent 52789931
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 {