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

Commit 0ac5f4eb authored by Ömer Faruk Yılmaz's avatar Ömer Faruk Yılmaz
Browse files

Add additional BluetoothTetheringNetworkFactoryTest

Bug: 237467631
Test: atest BluetoothTetheringNetworkFactoryTest
Change-Id: I8a09d8fa57c570bcfe50961d41df09b58557d1eb
parent 101a60c5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -115,4 +115,19 @@ public class BluetoothTetheringNetworkFactoryTest {
        verify(mPanService, times(1)).getConnectedDevices();
        verify(mPanService, times(1)).disconnect(bluetoothDevice);
    }

    @Test
    public void networkStopEmptyIface() {
        if (Looper.myLooper() == null) {
            Looper.prepare();
        }

        BluetoothTetheringNetworkFactory bluetoothTetheringNetworkFactory =
                new BluetoothTetheringNetworkFactory(mContext, Looper.myLooper(), mPanService);

        bluetoothTetheringNetworkFactory.stopNetwork();
        bluetoothTetheringNetworkFactory.stopReverseTether();

        assertThat(bluetoothTetheringNetworkFactory.getProvider()).isNull();
    }
}