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

Commit deec6996 authored by Ömer Faruk Yılmaz's avatar Ömer Faruk Yılmaz Committed by Cherrypicker Worker
Browse files

Add additional BluetoothTetheringNetworkFactoryTest

Bug: 237467631
Test: atest BluetoothTetheringNetworkFactoryTest
Change-Id: I8a09d8fa57c570bcfe50961d41df09b58557d1eb
(cherry picked from commit 0ac5f4eb)
Merged-In: I8a09d8fa57c570bcfe50961d41df09b58557d1eb
parent 7329530a
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();
    }
}