Modify test cases according to change in remove preference behavior.
Bug: 35365702 Test: make RunSettingsRoboTests Change-Id: I541f4bd946116c766a90da955c11933a5499fa93
This commit is contained in:
@@ -75,8 +75,10 @@ public class VibrateWhenRingPreferenceControllerTest {
|
||||
@Test
|
||||
public void display_notVoiceCapable_shouldNotDisplay() {
|
||||
when(mTelephonyManager.isVoiceCapable()).thenReturn(false);
|
||||
when(mScreen.findPreference(mController.getPreferenceKey()))
|
||||
.thenReturn(mock(Preference.class));
|
||||
final Preference preference = mock(Preference.class);
|
||||
when(mScreen.getPreferenceCount()).thenReturn(1);
|
||||
when(mScreen.getPreference(0)).thenReturn(preference);
|
||||
when(preference.getKey()).thenReturn(mController.getPreferenceKey());
|
||||
|
||||
mController.displayPreference(mScreen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user