Home
last modified time | relevance | path

Searched refs:mock (Results 1 – 25 of 627) sorted by relevance

12345678910>>...26

/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/manageapplications/
DManageApplicationsTest.java34 import static org.mockito.Mockito.mock;
150 ReflectionHelpers.setField(mFragment, "mResetAppsHelper", mock(ResetAppsHelper.class)); in onCreateView_shouldNotShowLoadingContainer()
153 final LayoutInflater layoutInflater = mock(LayoutInflater.class); in onCreateView_shouldNotShowLoadingContainer()
154 final View view = mock(View.class); in onCreateView_shouldNotShowLoadingContainer()
155 final View loadingContainer = mock(View.class); in onCreateView_shouldNotShowLoadingContainer()
159 mFragment.onCreateView(layoutInflater, mock(ViewGroup.class), null); in onCreateView_shouldNotShowLoadingContainer()
166 final SearchView searchView = mock(SearchView.class); in onCreateOptionsMenu_shouldSetSearchQueryListener()
167 final MenuItem searchMenu = mock(MenuItem.class); in onCreateOptionsMenu_shouldSetSearchQueryListener()
168 final MenuItem helpMenu = mock(MenuItem.class); in onCreateOptionsMenu_shouldSetSearchQueryListener()
176 mFragment.onCreateOptionsMenu(mMenu, mock(MenuInflater.class)); in onCreateOptionsMenu_shouldSetSearchQueryListener()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DNotificationPreferenceControllerTest.java31 import static org.mockito.Mockito.mock;
83 mController.updateState(mock(Preference.class)); in noCrashIfNoOnResume()
100 mController.onResume(appRow, mock(NotificationChannel.class), in isAvailable_notIfAppBlocked()
101 mock(NotificationChannelGroup.class), null); in isAvailable_notIfAppBlocked()
108 NotificationChannelGroup group = mock(NotificationChannelGroup.class); in isAvailable_notIfChannelBlocked()
110 NotificationChannel channel = mock(NotificationChannel.class); in isAvailable_notIfChannelBlocked()
120 NotificationChannel channel = mock(NotificationChannel.class); in isAvailable_notIfChannelGroupBlocked()
122 NotificationChannelGroup group = mock(NotificationChannelGroup.class); in isAvailable_notIfChannelGroupBlocked()
132 NotificationChannel channel = mock(NotificationChannel.class); in isAvailable()
134 NotificationChannelGroup group = mock(NotificationChannelGroup.class); in isAvailable()
[all …]
DVisibilityPreferenceControllerTest.java32 import static org.mockito.Mockito.mock;
114 mController.updateState(mock(RestrictedListPreference.class)); in testNoCrashIfNoOnResume()
115 mController.onPreferenceChange(mock(RestrictedListPreference.class), true); in testNoCrashIfNoOnResume()
159 NotificationChannel channel = mock(NotificationChannel.class); in testUpdateState_disabledByAdmin_disableSecure()
161 mController.onResume(new NotificationBackend.AppRow(), channel, null, mock( in testUpdateState_disabledByAdmin_disableSecure()
164 RestrictedListPreference pref = mock(RestrictedListPreference.class); in testUpdateState_disabledByAdmin_disableSecure()
181 NotificationChannel channel = mock(NotificationChannel.class); in testUpdateState_disabledByAdmin_disableUnredacted()
183 mController.onResume(new NotificationBackend.AppRow(), channel, null, mock( in testUpdateState_disabledByAdmin_disableUnredacted()
186 RestrictedListPreference pref = mock(RestrictedListPreference.class); in testUpdateState_disabledByAdmin_disableUnredacted()
198 NotificationChannel channel = mock(NotificationChannel.class); in testUpdateState_noLockScreenNotificationsGlobally()
[all …]
DAllowSoundPreferenceControllerTest.java29 import static org.mockito.Mockito.mock;
88 mController.updateState(mock(RestrictedSwitchPreference.class)); in testNoCrashIfNoOnResume()
89 mController.onPreferenceChange(mock(RestrictedSwitchPreference.class), true); in testNoCrashIfNoOnResume()
94 mController.onResume(null, mock(NotificationChannel.class), null, null); in testIsAvailable_notIfNull()
97 mController.onResume(mock(NotificationBackend.AppRow.class), null, null, null); in testIsAvailable_notIfNull()
105 mController.onResume(appRow, mock(NotificationChannel.class), null, null); in testIsAvailable_notIfAppBlocked()
112 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_notIfAppCreatedChannel()
121 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable()
130 NotificationChannel channel = mock(NotificationChannel.class); in testUpdateState_disabledByAdmin()
132 mController.onResume(new NotificationBackend.AppRow(), channel, null, mock( in testUpdateState_disabledByAdmin()
[all …]
DImportancePreferenceControllerTest.java32 import static org.mockito.Mockito.mock;
91 mController.updateState(mock(Preference.class)); in testNoCrashIfNoOnResume()
104 mController.onResume(appRow, mock(NotificationChannel.class), null, null); in testIsAvailable_ifAppBlocked()
111 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_isGroupBlocked()
113 NotificationChannelGroup group = mock(NotificationChannelGroup.class); in testIsAvailable_isGroupBlocked()
122 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_ifChannelBlocked()
131 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_notForDefaultChannel()
141 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable()
149 NotificationChannel channel = mock(NotificationChannel.class); in testUpdateState_disabledByAdmin()
151 mController.onResume(new NotificationBackend.AppRow(), channel, null, mock( in testUpdateState_disabledByAdmin()
[all …]
DBadgePreferenceControllerTest.java31 import static org.mockito.Mockito.mock;
87 mController.updateState(mock(RestrictedSwitchPreference.class)); in testNoCrashIfNoOnResume()
88 mController.onPreferenceChange(mock(RestrictedSwitchPreference.class), true); in testNoCrashIfNoOnResume()
95 mController.onResume(appRow, mock(NotificationChannel.class), null, null); in testIsAvailable_notIfAppBlocked()
102 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_notIfChannelBlocked()
112 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_channel_notIfAppOff()
122 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_notIfOffGlobally()
143 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_defaultChannel()
156 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_channel()
168 NotificationChannel channel = mock(NotificationChannel.class); in testIsAvailable_channelAppOff()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/testutils/
DFakeFeatureFactory.java19 import static org.mockito.Mockito.mock;
82 final Context context = mock(Context.class, Answers.RETURNS_DEEP_STUBS); in setupForTest()
99 supportFeatureProvider = mock(SupportFeatureProvider.class); in FakeFeatureFactory()
100 metricsFeatureProvider = mock(MetricsFeatureProvider.class); in FakeFeatureFactory()
101 powerUsageFeatureProvider = mock(PowerUsageFeatureProvider.class); in FakeFeatureFactory()
102 dashboardFeatureProvider = mock(DashboardFeatureProvider.class); in FakeFeatureFactory()
103 dockUpdaterFeatureProvider = mock(DockUpdaterFeatureProvider.class); in FakeFeatureFactory()
104 localeFeatureProvider = mock(LocaleFeatureProvider.class); in FakeFeatureFactory()
105 applicationFeatureProvider = mock(ApplicationFeatureProvider.class); in FakeFeatureFactory()
106 enterprisePrivacyFeatureProvider = mock(EnterprisePrivacyFeatureProvider.class); in FakeFeatureFactory()
[all …]
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/
DMainFragmentTest.java25 import static org.mockito.Mockito.mock;
73 final Preference networkPref = mock(Preference.class); in testUpdateWifi_NoNetwork()
75 final ConnectivityListener listener = mock(ConnectivityListener.class); in testUpdateWifi_NoNetwork()
90 final Preference networkPref = mock(Preference.class); in testUpdateWifi_hasEthernet()
92 final ConnectivityListener listener = mock(ConnectivityListener.class); in testUpdateWifi_hasEthernet()
107 final Preference networkPref = mock(Preference.class); in testUpdateWifi_hasEthernetConnected()
109 final ConnectivityListener listener = mock(ConnectivityListener.class); in testUpdateWifi_hasEthernetConnected()
124 final Preference networkPref = mock(Preference.class); in testUpdateWifi_wifiSignal()
126 final ConnectivityListener listener = mock(ConnectivityListener.class); in testUpdateWifi_wifiSignal()
173 final Preference networkPref = mock(Preference.class); in testUpdateWifi_notConnected()
[all …]
DPreferenceControllerFragmentTest.java23 import static org.mockito.Mockito.mock;
60 mock(AbstractPreferenceController.class); in testPreferenceControllerGetterSetter_shouldAddAndGetProperly()
72 mock(AbstractPreferenceController.class); in testOnPreferenceTreeClick_shouldCallPreferenceController()
75 final Preference mockPref = mock(Preference.class); in testOnPreferenceTreeClick_shouldCallPreferenceController()
84 mock(AbstractPreferenceController.class); in testUpdatePreferenceStates_shouldCallUpdateState()
89 final Preference mockPreference = mock(Preference.class); in testUpdatePreferenceStates_shouldCallUpdateState()
90 final PreferenceScreen mockScreen = mock(PreferenceScreen.class); in testUpdatePreferenceStates_shouldCallUpdateState()
102 mock(AbstractPreferenceController.class); in testUpdatePreferenceStates_shouldNotCallUnavailable()
107 final Preference mockPreference = mock(Preference.class); in testUpdatePreferenceStates_shouldNotCallUnavailable()
108 final PreferenceScreen mockScreen = mock(PreferenceScreen.class); in testUpdatePreferenceStates_shouldNotCallUnavailable()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/datausage/
DDataUsageUtilsTest.java21 import static org.mockito.Mockito.mock;
51 SubscriptionManager subscriptionManager = mock(SubscriptionManager.class); in getDefaultSubscriptionId_noSubscriptions_returnsInvalidId()
61 SubscriptionManager subscriptionManager = mock(SubscriptionManager.class); in getDefaultSubscriptionId_noDefaultSubscription_returnsFirstSubscription()
64 SubscriptionInfo info1 = mock(SubscriptionInfo.class); in getDefaultSubscriptionId_noDefaultSubscription_returnsFirstSubscription()
65 SubscriptionInfo info2 = mock(SubscriptionInfo.class); in getDefaultSubscriptionId_noDefaultSubscription_returnsFirstSubscription()
76 SubscriptionManager subscriptionManager = mock(SubscriptionManager.class); in getDefaultSubscriptionId_hasDefaultSubscription_returnsDefaultSubscription()
77 SubscriptionInfo info = mock(SubscriptionInfo.class); in getDefaultSubscriptionId_hasDefaultSubscription_returnsDefaultSubscription()
86 SubscriptionManager subscriptionManager = mock(SubscriptionManager.class); in getPrimaryPlan_noSubscriptions_returnsNull()
95 SubscriptionManager subscriptionManager = mock(SubscriptionManager.class); in getPrimaryPlan_dataLimitBytesIsZero_returnsNull()
96 SubscriptionPlan subscriptionPlan = mock(SubscriptionPlan.class); in getPrimaryPlan_dataLimitBytesIsZero_returnsNull()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DInstantAppButtonsPreferenceControllerTest.java25 import static org.mockito.Mockito.mock;
94 final PackageInfo packageInfo = mock(PackageInfo.class); in setUp()
132 final Menu menu = mock(Menu.class); in onCreateOptionsMenu_noLaunchUri_shouldNotAddInstallInstantAppMenu()
133 when(menu.add(anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(mock(MenuItem.class)); in onCreateOptionsMenu_noLaunchUri_shouldNotAddInstallInstantAppMenu()
144 final Menu menu = mock(Menu.class); in onCreateOptionsMenu_hasLaunchUri_shouldAddForceStop()
145 when(menu.add(anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(mock(MenuItem.class)); in onCreateOptionsMenu_hasLaunchUri_shouldAddForceStop()
156 final Menu menu = mock(Menu.class); in onPrepareOptionsMenu_noAppStoreLink_shoulDisableInstallInstantAppMenu()
157 final MenuItem menuItem = mock(MenuItem.class); in onPrepareOptionsMenu_noAppStoreLink_shoulDisableInstallInstantAppMenu()
168 final ResolveInfo resolveInfo = mock(ResolveInfo.class); in onPrepareOptionsMenu_hasAppStoreLink_shoulNotDisableInstallInstantAppMenu()
169 final ActivityInfo activityInfo = mock(ActivityInfo.class); in onPrepareOptionsMenu_hasAppStoreLink_shoulNotDisableInstallInstantAppMenu()
[all …]
DAppInfoDashboardFragmentTest.java29 import static org.mockito.Mockito.mock;
122 final AppEntry appEntry = mock(AppEntry.class); in shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue()
124 final PackageInfo packageInfo = mock(PackageInfo.class); in shouldShowUninstallForAll_installForOneOtherUserOnly_shouldReturnTrue()
138 final AppEntry appEntry = mock(AppEntry.class); in shouldShowUninstallForAll_installForSelfOnly_shouldReturnFalse()
140 final PackageInfo packageInfo = mock(PackageInfo.class); in shouldShowUninstallForAll_installForSelfOnly_shouldReturnFalse()
165 Menu menu = mock(Menu.class); in onPrepareOptionsMenuTestsSetup()
166 final MenuItem uninstallUpdatesMenuItem = mock(MenuItem.class); in onPrepareOptionsMenuTestsSetup()
167 final MenuItem uninstallForAllMenuItem = mock(MenuItem.class); in onPrepareOptionsMenuTestsSetup()
175 final AppEntry appEntry = mock(AppEntry.class); in onPrepareOptionsMenuTestsSetup()
192 final PackageInfo packageInfo = mock(PackageInfo.class); in ensurePackageInfoAvailable_hasPackageInfo_shouldReturnTrue()
[all …]
/packages/modules/ExtServices/tests/src/android/ext/services/notification/
DAssistantTest.java26 import static org.mockito.Mockito.mock;
130 ApplicationInfo info = mock(ApplicationInfo.class); in setUp()
134 when(mFile.startWrite()).thenReturn(mock(FileOutputStream.class)); in setUp()
151 Ranking mockRanking = mock(Ranking.class); in generateRanking()
169 mAssistant.onNotificationPosted(sbn, mock(RankingMap.class)); in dismissBadNotification()
170 mAssistant.setFakeRanking(mock(Ranking.class)); in dismissBadNotification()
175 sbn, mock(RankingMap.class), stats, NotificationListenerService.REASON_CANCEL); in dismissBadNotification()
183 mAssistant.onNotificationPosted(sbn, mock(RankingMap.class)); in testNoAdjustmentForInitialPost()
195 mAssistant.onNotificationPosted(sbn, mock(RankingMap.class)); in testTriggerAdjustment()
211 mAssistant.onNotificationPosted(sbn, mock(RankingMap.class)); in testMinCannotTriggerAdjustment()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/webview/
DWebViewAppPickerTest.java27 import static org.mockito.Mockito.mock;
111 mock(MetricsFeatureProvider.class)); in setUp()
112 mWvusWrapper = mock(WebViewUpdateServiceWrapper.class); in setUp()
150 RadioButtonPreference preference = mock(RadioButtonPreference.class); in testDisabledPackageShownAsDisabled()
164 RadioButtonPreference preference = mock(RadioButtonPreference.class); in testEnabledPackageShownAsEnabled()
178 RadioButtonPreference preference = mock(RadioButtonPreference.class); in testDisabledPackageShowsDisabledReasonSummary()
192 RadioButtonPreference preference = mock(RadioButtonPreference.class); in testEnabledPackageShowsEmptySummary()
214 UserPackage packageForFirstUser = mock(UserPackage.class); in testDisabledReasonNullIfPackagesOk()
218 UserPackage packageForSecondUser = mock(UserPackage.class); in testDisabledReasonNullIfPackagesOk()
222 WebViewUpdateServiceWrapper wvusWrapper = mock(WebViewUpdateServiceWrapper.class); in testDisabledReasonNullIfPackagesOk()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/users/
DUserSettingsTest.java26 import static org.mockito.Mockito.mock;
107 mock(AddUserWhenLockedPreferenceController.class)); in setUp()
109 mock(MultiUserFooterPreferenceController.class)); in setUp()
123 final SharedPreferences prefs = mock(SharedPreferences .class); in setUp()
172 doReturn(mock(PreferenceScreen.class)).when(mFragment).getPreferenceScreen(); in updateUserList_cannotSwitchUser_shouldNotBeSelectableForGuest()
198 doReturn(mock(PreferenceScreen.class)).when(mFragment).getPreferenceScreen(); in updateUserList_cannotSwitchUser_shouldDisableAddUser()
210 final RestrictedPreference addUser = mock(RestrictedPreference.class); in updateUserList_cannotAddUserButCanSwitchUser_shouldNotShowAddUser()
216 mFragment.mUserListCategory = mock(PreferenceCategory.class); in updateUserList_cannotAddUserButCanSwitchUser_shouldNotShowAddUser()
219 doReturn(mock(PreferenceScreen.class)).when(mFragment).getPreferenceScreen(); in updateUserList_cannotAddUserButCanSwitchUser_shouldNotShowAddUser()
246 Menu menu = mock(Menu.class); in withDisallowRemoveUser_ShouldDisableRemoveUser()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/legal/
DModuleLicensesPreferenceControllerTest.java23 import static org.mockito.Mockito.mock;
76 Context context = mock(Context.class); in displayPreference_alphabeticalOrder()
79 PackageManager packageManager = mock(PackageManager.class); in displayPreference_alphabeticalOrder()
81 PreferenceScreen screen = mock(PreferenceScreen.class); in displayPreference_alphabeticalOrder()
84 when(group.getPreferenceManager()).thenReturn(mock(PreferenceManager.class)); in displayPreference_alphabeticalOrder()
94 Resources resources = mock(Resources.class); in displayPreference_alphabeticalOrder()
96 AssetManager manager = mock(AssetManager.class); in displayPreference_alphabeticalOrder()
110 Context context = mock(Context.class); in displayPreference_includeOnlyModulesWithLicenseFile()
113 PackageManager packageManager = mock(PackageManager.class); in displayPreference_includeOnlyModulesWithLicenseFile()
115 PreferenceScreen screen = mock(PreferenceScreen.class); in displayPreference_includeOnlyModulesWithLicenseFile()
[all …]
DModuleLicensesListPreferenceControllerTest.java23 import static org.mockito.Mockito.mock;
51 Context context = mock(Context.class); in getAvailabilityStatus_validLicenses_returnsAvailable()
52 PackageManager packageManager = mock(PackageManager.class); in getAvailabilityStatus_validLicenses_returnsAvailable()
63 Resources resources = mock(Resources.class); in getAvailabilityStatus_validLicenses_returnsAvailable()
65 AssetManager manager = mock(AssetManager.class); in getAvailabilityStatus_validLicenses_returnsAvailable()
77 Context context = mock(Context.class); in getAvailabilityStatus_noModules_returnsConditionallyUnavailable()
78 PackageManager packageManager = mock(PackageManager.class); in getAvailabilityStatus_noModules_returnsConditionallyUnavailable()
92 Context context = mock(Context.class); in getAvailabilityStatus_noLicenses_returnsConditionallyUnavailable()
93 PackageManager packageManager = mock(PackageManager.class); in getAvailabilityStatus_noLicenses_returnsConditionallyUnavailable()
104 Resources resources = mock(Resources.class); in getAvailabilityStatus_noLicenses_returnsConditionallyUnavailable()
[all …]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/deletionhelper/
DDeletionHelperSettingsTest.java25 import static org.mockito.Mockito.mock;
68 ApplicationInfo info = mock(ApplicationInfo.class); in realAppHasGaugeTitle()
81 PreferenceScreen preferenceScreen = mock(PreferenceScreen.class); in downloadsNotDeletedInNoThresholdMode()
83 DownloadsDeletionType downloadsDeletionType = mock(DownloadsDeletionType.class); in downloadsNotDeletedInNoThresholdMode()
96 AppDeletionType appBackend = mock(AppDeletionType.class); in onFreeableChangeChecksForNull()
108 PreferenceScreen preferenceScreen = mock(PreferenceScreen.class); in requestingSpecificBytesToClearSetsOkResultCodeOnSufficientClear()
112 settings.mDownloadsPreference = mock(DownloadsDeletionPreferenceGroup.class); in requestingSpecificBytesToClearSetsOkResultCodeOnSufficientClear()
113 DownloadsDeletionType downloadsDeletionType = mock(DownloadsDeletionType.class); in requestingSpecificBytesToClearSetsOkResultCodeOnSufficientClear()
127 PreferenceScreen preferenceScreen = mock(PreferenceScreen.class); in requestingSpecificBytesToClearSetsNegativeResultCodeOnSufficientClear()
131 settings.mDownloadsPreference = mock(DownloadsDeletionPreferenceGroup.class); in requestingSpecificBytesToClearSetsNegativeResultCodeOnSufficientClear()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DStorageDashboardFragmentTest.java23 import static org.mockito.Mockito.mock;
68 Activity activity = mock(Activity.class); in test_initializeOptionsMenuInvalidatesExistingMenu()
77 CachedStorageValuesHelper helper = mock(CachedStorageValuesHelper.class); in test_cacheProviderProvidesValuesIfBothCached()
92 CachedStorageValuesHelper helper = mock(CachedStorageValuesHelper.class); in test_cacheProviderDoesntProvideValuesIfAppsMissing()
105 CachedStorageValuesHelper helper = mock(CachedStorageValuesHelper.class); in test_cacheProviderDoesntProvideValuesIfVolumeInfoMissing()
118 View fakeView = mock(View.class, RETURNS_DEEP_STUBS); in test_loadWhenQuotaOffIfVolumeInfoNotLoaded()
119 RecyclerView fakeRecyclerView = mock(RecyclerView.class, RETURNS_DEEP_STUBS); in test_loadWhenQuotaOffIfVolumeInfoNotLoaded()
132 View fakeView = mock(View.class, RETURNS_DEEP_STUBS); in test_dontLoadWhenQuotaOffIfVolumeInfoNotLoaded()
133 RecyclerView fakeRecyclerView = mock(RecyclerView.class, RETURNS_DEEP_STUBS); in test_dontLoadWhenQuotaOffIfVolumeInfoNotLoaded()
149 View fakeView = mock(View.class, RETURNS_DEEP_STUBS); in test_loadWhenQuotaOnAndVolumeInfoLoadedButAppsMissing()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
DAppDataUsageTest.java29 import static org.mockito.Mockito.mock;
140 final UidDetailProvider uidDetailProvider = mock(UidDetailProvider.class); in onCreate_notAppUid_shouldGetAppLabelFromUidDetailProvider()
169 .thenReturn(mock(PreferenceManager.class, RETURNS_DEEP_STUBS)); in bindAppHeader_allWorkApps_shouldNotShowAppInfoLink()
170 doReturn(mock(PreferenceScreen.class)).when(mFragment).getPreferenceScreen(); in bindAppHeader_allWorkApps_shouldNotShowAppInfoLink()
171 ReflectionHelpers.setField(mFragment, "mAppItem", mock(AppItem.class)); in bindAppHeader_allWorkApps_shouldNotShowAppInfoLink()
201 .thenReturn(mock(PreferenceManager.class, RETURNS_DEEP_STUBS)); in bindAppHeader_workApp_shouldSetWorkAppUid()
202 doReturn(mock(PreferenceScreen.class)).when(mFragment).getPreferenceScreen(); in bindAppHeader_workApp_shouldSetWorkAppUid()
214 final RestrictedSwitchPreference pref = mock(RestrictedSwitchPreference.class); in changePreference_backgroundData_shouldUpdateUI()
215 final DataSaverBackend dataSaverBackend = mock(DataSaverBackend.class); in changePreference_backgroundData_shouldUpdateUI()
233 = mock(RestrictedSwitchPreference.class); in updatePrefs_restrictedByAdmin_shouldDisablePreference()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DSubscriptionUtilTest.java25 import static org.mockito.Mockito.mock;
73 final SubscriptionInfo info = mock(SubscriptionInfo.class); in getAvailableSubscriptions_oneSubscription_oneResult()
82 final SubscriptionInfo info1 = mock(SubscriptionInfo.class); in getAvailableSubscriptions_twoSubscriptions_twoResults()
83 final SubscriptionInfo info2 = mock(SubscriptionInfo.class); in getAvailableSubscriptions_twoSubscriptions_twoResults()
92 final SubscriptionInfo info1 = mock(SubscriptionInfo.class); in getAvailableSubscriptions_oneSelectableOneDisabledPSim_twoResults()
93 final SubscriptionInfo info2 = mock(SubscriptionInfo.class); in getAvailableSubscriptions_oneSelectableOneDisabledPSim_twoResults()
106 final UiccSlotInfo info2slot = mock(UiccSlotInfo.class); in getAvailableSubscriptions_oneSelectableOneDisabledPSim_twoResults()
123 final SubscriptionInfo info1 = mock(SubscriptionInfo.class); in getAvailableSubscriptions_oneSelectableTwoDisabledPSimsOneAbsent_twoResults()
124 final SubscriptionInfo info2 = mock(SubscriptionInfo.class); in getAvailableSubscriptions_oneSelectableTwoDisabledPSimsOneAbsent_twoResults()
125 final SubscriptionInfo info3 = mock(SubscriptionInfo.class); in getAvailableSubscriptions_oneSelectableTwoDisabledPSimsOneAbsent_twoResults()
[all …]
DMobileNetworkSummaryControllerTest.java25 import static org.mockito.Mockito.mock;
108 final ConnectivityManager cm = mock(ConnectivityManager.class); in isAvailable_wifiOnlyMode_notAvailable()
118 final ConnectivityManager cm = mock(ConnectivityManager.class); in isAvailable_secondaryUser_notAvailable()
150 final SubscriptionInfo sub1 = mock(SubscriptionInfo.class); in getSummary_oneSubscription_correctSummaryAndClickHandler()
170 final SubscriptionInfo sub1 = mock(SubscriptionInfo.class); in getSummary_oneInactivePSim_correctSummaryAndClickHandler()
188 final SubscriptionInfo sub1 = mock(SubscriptionInfo.class); in getSummary_twoSubscriptions_correctSummaryAndFragment()
189 final SubscriptionInfo sub2 = mock(SubscriptionInfo.class); in getSummary_twoSubscriptions_correctSummaryAndFragment()
202 final SubscriptionInfo sub1 = mock(SubscriptionInfo.class); in getSummaryAfterUpdate_twoSubscriptionsBecomesOne_correctSummaryAndFragment()
203 final SubscriptionInfo sub2 = mock(SubscriptionInfo.class); in getSummaryAfterUpdate_twoSubscriptionsBecomesOne_correctSummaryAndFragment()
230 final SubscriptionInfo sub1 = mock(SubscriptionInfo.class); in getSummaryAfterUpdate_oneSubscriptionBecomesTwo_correctSummaryAndFragment()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DAppStateNotificationBridgeTest.java41 import static org.mockito.Mockito.mock;
99 when(mState.getBackgroundLooper()).thenReturn(mock(Looper.class)); in setUp()
107 mock(AppStateBaseBridge.Callback.class), mUsageStats, mUserManager, mBackend); in setUp()
111 AppEntry entry = mock(AppEntry.class); in getMockAppEntry()
112 entry.info = mock(ApplicationInfo.class); in getMockAppEntry()
129 .thenReturn(mock(UsageEvents.class)); in testGetAggregatedUsageEvents_noEvents()
208 .thenReturn(mock(UsageEvents.class)); in testLoadAllExtraInfo_noEvents()
288 mock(AppStateBaseBridge.Callback.class), mUsageStats, mUserManager, mBackend); in testLoadAllExtraInfo_multipleUsers()
343 .thenReturn(mock(UsageEvents.class)); in testUpdateExtraInfo_noEvents()
430 AppEntry allow = mock(AppEntry.class); in testFilterRecency()
[all …]
/packages/modules/NetworkStack/tests/unit/src/com/android/server/
DNetworkStackServiceTest.kt51 import org.mockito.Mockito.mock
74 private val permChecker = mock(PermissionChecker::class.java)
75 private val mockIpMemoryStoreService = mock(IpMemoryStoreService::class.java)
76 private val mockDhcpServer = mock(DhcpServer::class.java)
77 private val mockNetworkMonitor = mock(NetworkMonitor::class.java)
78 private val mockIpClient = mock(IpClient::class.java)
79 private val deps = mock(Dependencies::class.java).apply { in <lambda>()
86 private val netd = mock(INetd::class.java).apply { in <lambda>()
90 private val netdBinder = mock(IBinder::class.java).apply { in <lambda>()
93 private val context = mock(Context::class.java).apply { in <lambda>()
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/
DNetworkUtilsTest.java21 import static org.mockito.Mockito.mock;
39 ConnectivityManager connectivityManager = mock(ConnectivityManager.class); in hasMobileNetwork_hasCellularCapabilities_returnsTrue()
40 Network network = mock(Network.class); in hasMobileNetwork_hasCellularCapabilities_returnsTrue()
41 NetworkCapabilities capabilities = mock(NetworkCapabilities.class); in hasMobileNetwork_hasCellularCapabilities_returnsTrue()
52 ConnectivityManager connectivityManager = mock(ConnectivityManager.class); in hasMobileNetwork_hasNoCellularCapabilities_returnsFalse()
53 Network network = mock(Network.class); in hasMobileNetwork_hasNoCellularCapabilities_returnsFalse()
54 NetworkCapabilities capabilities = mock(NetworkCapabilities.class); in hasMobileNetwork_hasNoCellularCapabilities_returnsFalse()
65 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_simAbsent_returnsFalse()
73 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_simUnknown_returnsFalse()
81 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_otherStatus_returnsTrue()

12345678910>>...26