/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenModeRepeatCallersPreferenceControllerTest.java | 62 private SwitchPreference mockPref; field in ZenModeRepeatCallersPreferenceControllerTest 84 when(mPreferenceScreen.findPreference(mController.getPreferenceKey())).thenReturn(mockPref); in setup() 91 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_TotalSilence() local 92 mController.updateState(mockPref); in updateState_TotalSilence() 94 verify(mockPref).setEnabled(false); in updateState_TotalSilence() 95 verify(mockPref).setChecked(false); in updateState_TotalSilence() 102 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_AlarmsOnly() local 103 mController.updateState(mockPref); in updateState_AlarmsOnly() 105 verify(mockPref).setEnabled(false); in updateState_AlarmsOnly() 106 verify(mockPref).setChecked(false); in updateState_AlarmsOnly() [all …]
|
D | ZenModeSystemPreferenceControllerTest.java | 59 private SwitchPreference mockPref; field in ZenModeSystemPreferenceControllerTest 80 when(mPreferenceScreen.findPreference(mController.getPreferenceKey())).thenReturn(mockPref); in setup() 88 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_TotalSilence() local 89 mController.updateState(mockPref); in updateState_TotalSilence() 91 verify(mockPref).setEnabled(false); in updateState_TotalSilence() 92 verify(mockPref).setChecked(false); in updateState_TotalSilence() 99 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_AlarmsOnly() local 100 mController.updateState(mockPref); in updateState_AlarmsOnly() 102 verify(mockPref).setEnabled(false); in updateState_AlarmsOnly() 103 verify(mockPref).setChecked(false); in updateState_AlarmsOnly() [all …]
|
D | ZenModeRemindersPreferenceControllerTest.java | 62 private SwitchPreference mockPref; field in ZenModeRemindersPreferenceControllerTest 85 .thenReturn(mockPref); in setup() 93 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_TotalSilence() local 94 mController.updateState(mockPref); in updateState_TotalSilence() 96 verify(mockPref).setEnabled(false); in updateState_TotalSilence() 97 verify(mockPref).setChecked(false); in updateState_TotalSilence() 104 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_AlarmsOnly() local 105 mController.updateState(mockPref); in updateState_AlarmsOnly() 107 verify(mockPref).setEnabled(false); in updateState_AlarmsOnly() 108 verify(mockPref).setChecked(false); in updateState_AlarmsOnly() [all …]
|
D | ZenModeEventsPreferenceControllerTest.java | 62 private SwitchPreference mockPref; field in ZenModeEventsPreferenceControllerTest 84 .thenReturn(mockPref); in setup() 92 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_TotalSilence() local 93 mController.updateState(mockPref); in updateState_TotalSilence() 95 verify(mockPref).setEnabled(false); in updateState_TotalSilence() 96 verify(mockPref).setChecked(false); in updateState_TotalSilence() 103 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_AlarmsOnly() local 104 mController.updateState(mockPref); in updateState_AlarmsOnly() 106 verify(mockPref).setEnabled(false); in updateState_AlarmsOnly() 107 verify(mockPref).setChecked(false); in updateState_AlarmsOnly() [all …]
|
D | ZenModeMediaPreferenceControllerTest.java | 62 private SwitchPreference mockPref; field in ZenModeMediaPreferenceControllerTest 84 .thenReturn(mockPref); in setup() 92 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_TotalSilence() local 93 mController.updateState(mockPref); in updateState_TotalSilence() 95 verify(mockPref).setEnabled(false); in updateState_TotalSilence() 96 verify(mockPref).setChecked(false); in updateState_TotalSilence() 103 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_AlarmsOnly() local 104 mController.updateState(mockPref); in updateState_AlarmsOnly() 106 verify(mockPref).setEnabled(false); in updateState_AlarmsOnly() 107 verify(mockPref).setChecked(true); in updateState_AlarmsOnly() [all …]
|
D | ZenModeAlarmsPreferenceControllerTest.java | 62 private SwitchPreference mockPref; field in ZenModeAlarmsPreferenceControllerTest 85 .thenReturn(mockPref); in setup() 93 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_TotalSilence() local 94 mController.updateState(mockPref); in updateState_TotalSilence() 96 verify(mockPref).setEnabled(false); in updateState_TotalSilence() 97 verify(mockPref).setChecked(false); in updateState_TotalSilence() 104 final SwitchPreference mockPref = mock(SwitchPreference.class); in updateState_AlarmsOnly() local 105 mController.updateState(mockPref); in updateState_AlarmsOnly() 107 verify(mockPref).setEnabled(false); in updateState_AlarmsOnly() 108 verify(mockPref).setChecked(true); in updateState_AlarmsOnly() [all …]
|
D | ZenRuleVisEffectPreferenceControllerTest.java | 57 private DisabledCheckBoxPreference mockPref; field in ZenRuleVisEffectPreferenceControllerTest 85 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mockPref); in setup() 119 mController.updateState(mockPref); in updateState_notChecked() 121 verify(mockPref).setChecked(false); in updateState_notChecked() 122 verify(mockPref).enableCheckbox(true); in updateState_notChecked() 130 mController.updateState(mockPref); in updateState_checked() 132 verify(mockPref).setChecked(true); in updateState_checked() 133 verify(mockPref).enableCheckbox(true); in updateState_checked() 144 mController.updateState(mockPref); in updateState_checkedFalse_parentChecked() 146 verify(mockPref).setChecked(true); in updateState_checkedFalse_parentChecked() [all …]
|
D | ZenModeVisEffectPreferenceControllerTest.java | 63 private DisabledCheckBoxPreference mockPref; field in ZenModeVisEffectPreferenceControllerTest 89 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mockPref); in setup() 117 mController.updateState(mockPref); in updateState_notChecked() 119 verify(mockPref).setChecked(false); in updateState_notChecked() 120 verify(mockPref).enableCheckbox(true); in updateState_notChecked() 126 mController.updateState(mockPref); in updateState_checked() 128 verify(mockPref).setChecked(true); in updateState_checked() 129 verify(mockPref).enableCheckbox(true); in updateState_checked() 141 mController.updateState(mockPref); in updateState_checkedFalse_parentChecked() 143 verify(mockPref).setChecked(true); in updateState_checkedFalse_parentChecked() [all …]
|
D | ZenModeBehaviorFooterPreferenceControllerTest.java | 70 private Preference mockPref; field in ZenModeBehaviorFooterPreferenceControllerTest 97 .thenReturn(mockPref); in setup() 128 mController.updateState(mockPref); in zenModeOff_updateState_noFooterTitle() 130 verify(mockPref).setTitle(mContext.getString(mTitleResId)); in zenModeOff_updateState_noFooterTitle() 136 mController.updateState(mockPref); in zenModeImportantInterruptions_updateState_noFooterTitle() 138 verify(mockPref).setTitle(mContext.getString(mTitleResId)); in zenModeImportantInterruptions_updateState_noFooterTitle() 149 mController.updateState(mockPref); in deprecatedZenModeAlarms_qsManualRule_setFooterTitle() 151 verify(mockPref).setTitle(mContext.getString( in deprecatedZenModeAlarms_qsManualRule_setFooterTitle() 165 mController.updateState(mockPref); in deprecatedZenModeAlarms_appManualRule_setFooterTitle() 167 verify(mockPref).setTitle(mContext.getString( in deprecatedZenModeAlarms_appManualRule_setFooterTitle() [all …]
|
D | ZenModeSettingsFooterPreferenceControllerTest.java | 75 private Preference mockPref; field in ZenModeSettingsFooterPreferenceControllerTest 101 when(mPreferenceScreen.findPreference(mController.getPreferenceKey())).thenReturn(mockPref); in setup() 133 mController.updateState(mockPref); in testDefaultNotifPolicy_app_manualRule_setFooterTitle() 135 verify(mockPref).setTitle(mContext.getString( in testDefaultNotifPolicy_app_manualRule_setFooterTitle() 145 mController.updateState(mockPref); in testDefaultNotifPolicy_time_manualRule_setFooterTitle() 147 verify(mockPref).setTitle(mContext.getString( in testDefaultNotifPolicy_time_manualRule_setFooterTitle() 155 mController.updateState(mockPref); in testDefaultNotifPolicy_forever_manualRule_setFooterTitle() 157 verify(mockPref).setTitle(mContext.getString( in testDefaultNotifPolicy_forever_manualRule_setFooterTitle() 170 mController.updateState(mockPref); in testDefaultNotifPolicy_automaticRule_noManualRule_setFooterTitle() 172 verify(mockPref).setTitle(mContext.getString( in testDefaultNotifPolicy_automaticRule_noManualRule_setFooterTitle() [all …]
|
D | ZenModeAutomaticRulesPreferenceControllerTest.java | 61 private PreferenceCategory mockPref; field in ZenModeAutomaticRulesPreferenceControllerTest 76 mockPref); in setup() 103 mController.updateState(mockPref); in testUpdateState_clearsPreferencesWhenAddingNewPreferences() 104 verify(mockPref, times(1)).removeAll(); in testUpdateState_clearsPreferencesWhenAddingNewPreferences() 105 verify(mockPref, times(NUM_RULES)).addPreference(any()); in testUpdateState_clearsPreferencesWhenAddingNewPreferences() 125 when(mockPref.getPreferenceCount()).thenReturn(NUM_RULES + 2); in testUpdateState_clearsPreferencesWhenRemovingPreferences() 127 mController.updateState(mockPref); in testUpdateState_clearsPreferencesWhenRemovingPreferences() 128 verify(mockPref, times(1)).removeAll(); in testUpdateState_clearsPreferencesWhenRemovingPreferences() 129 verify(mockPref, times(NUM_RULES)).addPreference(any()); in testUpdateState_clearsPreferencesWhenRemovingPreferences() 141 when(mockPref.getPreferenceCount()).thenReturn(NUM_RULES); in testUpdateState_updateEnableState() [all …]
|
D | ZenRuleRepeatCallersPreferenceControllerTest.java | 53 private SwitchPreference mockPref; field in ZenRuleRepeatCallersPreferenceControllerTest 78 mockPref); in setup() 88 mController.updateState(mockPref); in updateState_Priority_anyCallers() 90 verify(mockPref).setEnabled(false); in updateState_Priority_anyCallers() 91 verify(mockPref).setChecked(true); in updateState_Priority_anyCallers() 100 mController.updateState(mockPref); in onPreferenceChanged_EnableRepeatCallers() 101 mController.onPreferenceChange(mockPref, true); in onPreferenceChanged_EnableRepeatCallers() 115 mController.updateState(mockPref); in onPreferenceChanged_DisableRepeatCallers() 116 mController.onPreferenceChange(mockPref, false); in onPreferenceChanged_DisableRepeatCallers()
|
D | ZenFooterPreferenceControllerTest.java | 63 private FooterPreference mockPref; field in ZenFooterPreferenceControllerTest 84 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mockPref); in setup() 117 mController.updateState(mockPref); in updateSummary_noVisEffects() 118 verify(mockPref).setTitle(R.string.zen_mode_restrict_notifications_mute_footer); in updateSummary_noVisEffects() 124 mController.updateState(mockPref); in getSummary_someVisEffects() 125 verify(mockPref).setTitle(null); in getSummary_someVisEffects() 140 mController.updateState(mockPref); in getSummary_allVisEffects() 141 verify(mockPref).setTitle(R.string.zen_mode_restrict_notifications_hide_footer); in getSummary_allVisEffects()
|
D | ZenRuleCustomSwitchPreferenceControllerTest.java | 51 private SwitchPreference mockPref; field in ZenRuleCustomSwitchPreferenceControllerTest 77 .thenReturn(mockPref); in setup() 87 mController.onPreferenceChange(mockPref, true); in onPreferenceChanged_enable() 101 mController.onPreferenceChange(mockPref, false); in onPreferenceChanged_disable()
|
D | ZenRuleStarredContactsPreferenceControllerTest.java | 58 private Preference mockPref; field in ZenRuleStarredContactsPreferenceControllerTest 92 .thenReturn(mockPref); in setup() 101 .thenReturn(mockPref); in setup()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dream/ |
D | CurrentDreamPreferenceControllerTest.java | 85 GearPreference mockPref = mock(GearPreference.class); in gearShowsIfActiveDreamInfoHasOptions() local 90 mController.updateState(mockPref); in gearShowsIfActiveDreamInfoHasOptions() 91 verify(mockPref).setOnGearClickListener(captor.capture()); in gearShowsIfActiveDreamInfoHasOptions() 102 GearPreference mockPref = mock(GearPreference.class); in gearHidesIfActiveDreamInfoHasNoOptions() local 107 mController.updateState(mockPref); in gearHidesIfActiveDreamInfoHasNoOptions() 108 verify(mockPref).setOnGearClickListener(captor.capture()); in gearHidesIfActiveDreamInfoHasNoOptions()
|
D | WhenToDreamPreferenceControllerTest.java | 60 final Preference mockPref = mock(Preference.class); in updateSummary() local 61 when(mockPref.getContext()).thenReturn(mContext); in updateSummary() 66 mController.updateState(mockPref); in updateSummary() 67 verify(mockPref).setSummary(expectedString); in updateSummary()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/ |
D | PreferenceControllerFragmentTest.java | 75 final Preference mockPref = mock(Preference.class); in testOnPreferenceTreeClick_shouldCallPreferenceController() local 76 mPreferenceControllerFragment.onPreferenceTreeClick(mockPref); in testOnPreferenceTreeClick_shouldCallPreferenceController() 78 verify(mockController, times(1)).handlePreferenceTreeClick(mockPref); in testOnPreferenceTreeClick_shouldCallPreferenceController()
|