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

Commit 3905fd7a authored by Guojing Yuan's avatar Guojing Yuan
Browse files

Add a test for the NPE case

Fix: 305784475

Test: unit test
Change-Id: I28b19da80e83bbbddf8a71399fbf706fcbb81a5c
parent 7bc84c58
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -91,6 +91,14 @@ public class BluetoothDetailsDataSyncControllerTest extends BluetoothDetailsCont
        assertThat(mController.isAvailable()).isTrue();
    }

    @Test
    public void refresh_noAssociations_checkPreferenceInvisible() {
        mController.mAssociationId = DUMMY_ASSOCIATION_ID;
        mController.refresh();

        assertThat(mPermSyncPreference.isVisible()).isFalse();
    }

    @Test
    public void refresh_permSyncNull_checkPreferenceInvisible() {
        mPermissionSyncRequest = null;