Checke radio on default app screen if there's 1 option only
Change-Id: Ib091eb033ce541dc6a6d97ef45a15a5eb957e405 Fix: 34746591 Test: make RunSettingsRoboTests -j40
This commit is contained in:
@@ -106,6 +106,18 @@ public class DefaultAppPickerFragmentTest {
|
||||
mFragment.onRadioButtonClicked(pref);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void displaySingleOption_shouldSelectRadioButton() {
|
||||
final RadioButtonPreference pref =
|
||||
new RadioButtonPreference(RuntimeEnvironment.application);
|
||||
when(mScreen.getPreferenceCount()).thenReturn(1);
|
||||
when(mScreen.getPreference(0)).thenReturn(pref);
|
||||
|
||||
mFragment.mayCheckOnlyRadioButton();
|
||||
|
||||
assertThat(pref.isChecked()).isTrue();
|
||||
}
|
||||
|
||||
public static class TestFragment extends DefaultAppPickerFragment {
|
||||
|
||||
boolean setDefaultAppKeyCalled;
|
||||
|
Reference in New Issue
Block a user