From d6eb5237e2629a0b33a4fe904c3c7b6248ec5023 Mon Sep 17 00:00:00 2001 From: Tim Peng Date: Wed, 3 Mar 2021 17:02:07 +0800 Subject: [PATCH] [Fix]Test cast fail at BaseBluetoothDialogPreferenceTest Bug: 181740451 Test: make -j50 RunSettingsRoboTests Change-Id: I8b786272f50680e9e388ca64bb8d3410b85b327a --- .../bluetooth/BaseBluetoothDialogPreferenceTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/robotests/src/com/android/settings/development/bluetooth/BaseBluetoothDialogPreferenceTest.java b/tests/robotests/src/com/android/settings/development/bluetooth/BaseBluetoothDialogPreferenceTest.java index 8a3493087a0..323486e5da9 100644 --- a/tests/robotests/src/com/android/settings/development/bluetooth/BaseBluetoothDialogPreferenceTest.java +++ b/tests/robotests/src/com/android/settings/development/bluetooth/BaseBluetoothDialogPreferenceTest.java @@ -105,6 +105,7 @@ public class BaseBluetoothDialogPreferenceTest { public void onBindDialogView_checkRadioButtonsText() { when(mView.findViewById(ID1)).thenReturn(mRadioButton1); when(mView.findViewById(ID2)).thenReturn(mRadioButton2); + when(mView.findViewById(TEXT_VIEW_ID)).thenReturn(mTextView); assertThat(mRadioButton1.getText()).isNotEqualTo(BUTTON1); assertThat(mRadioButton2.getText()).isNotEqualTo(BUTTON2); @@ -118,6 +119,7 @@ public class BaseBluetoothDialogPreferenceTest { public void onBindDialogView_checkRadioButtonsState() { when(mView.findViewById(ID1)).thenReturn(mRadioButton1); when(mView.findViewById(ID2)).thenReturn(mRadioButton2); + when(mView.findViewById(TEXT_VIEW_ID)).thenReturn(mTextView); List indexes = new ArrayList<>(); indexes.add(0); when(mCallback.getSelectableIndex()).thenReturn(indexes);