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

Commit 833431bf authored by Ömer Faruk Yılmaz's avatar Ömer Faruk Yılmaz Committed by Automerger Merge Worker
Browse files

Merge "Add additional BluetoothTetheringNetworkFactoryTest" am: 98ff002f am:...

Merge "Add additional BluetoothTetheringNetworkFactoryTest" am: 98ff002f am: 3daf3ab0 am: f719fb9a

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2319273



Change-Id: I6795ea2888fb87f1a108662eccc3657e706a0454
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 0feaa3b0 f719fb9a
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();
    }
}