Merge "Add a test for the NPE case" into main

This commit is contained in:
Guojing Yuan
2023-10-19 17:10:25 +00:00
committed by Android (Google) Code Review

View File

@@ -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;