Home
last modified time | relevance | path

Searched refs:anyInt (Results 1 – 25 of 1232) sorted by relevance

12345678910>>...50

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/stats/
DStatsdAdServicesLoggerTest.java91 import static org.mockito.ArgumentMatchers.anyInt;
197 anyInt(), anyInt(), anyInt(), anyInt(), any(byte[].class))); in testLogGetTopicsReportedStats_tPlus()
202 anyInt(), any(int[].class), anyInt(), anyInt(), anyInt())); in testLogGetTopicsReportedStats_tPlus()
238 anyInt(), any(int[].class), anyInt(), anyInt(), anyInt())); in testLogGetTopicsReportedStats_tPlus_noCompatLoggingDueToKillSwitch()
265 anyInt(), anyInt(), anyInt(), anyInt(), any(byte[].class))); in testLogGetTopicsReportedStats_sMinus()
305 anyInt(), in testLogEpochComputationClassifierStats_tPlus()
307 anyInt(), in testLogEpochComputationClassifierStats_tPlus()
309 anyInt(), in testLogEpochComputationClassifierStats_tPlus()
310 anyInt(), in testLogEpochComputationClassifierStats_tPlus()
311 anyInt())); in testLogEpochComputationClassifierStats_tPlus()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/os/
DCarPerformanceManagerTest.java22 import static org.mockito.ArgumentMatchers.anyInt;
102 verify(mCarWatchdogDaemonHelper).setThreadPriority(anyInt(), anyInt(), anyInt(), in testSetThreadPriority()
109 .setThreadPriority(anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); in testSetThreadPriorityIllegalArgumentException()
123 anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); in testSetThreadPriorityIllegalStateException()
137 anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); in testSetThreadPriorityRemoteException()
148 anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); in testSetThreadPriorityServiceSpecificException()
160 anyInt(), anyInt(), anyInt())).thenReturn(p); in testGetThreadPriority()
172 anyInt(), anyInt(), anyInt())).thenReturn(p); in testGetThreadPriorityDefaultPolicy()
184 anyInt(), anyInt(), anyInt())).thenReturn(p); in testGetThreadPriorityInvalidPolicy()
193 anyInt(), anyInt(), anyInt())).thenReturn(p); in testGetThreadPriorityInvalidPriority()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DDppManagerTest.java63 import static org.mockito.Mockito.anyInt;
164 when(mWifiNative.removeDppUri(anyString(), anyInt())) in setUp()
168 when(mWifiNative.startDppEnrolleeInitiator(anyString(), anyInt(), anyInt())).thenReturn( in setUp()
172 when(mWifiNative.startDppConfiguratorInitiator(anyString(), anyInt(), anyInt(), anyString(), in setUp()
173 any(), any(), anyInt(), anyInt(), any())).thenReturn(true); in setUp()
182 anyString(), anyString(), anyInt())).thenReturn(mBootStrapInfo); in setUp()
185 when(mWifiNative.startDppEnrolleeResponder(anyString(), anyInt())).thenReturn(true); in setUp()
207 when(mWifiConfigManager.getConfiguredNetworkWithoutMasking(anyInt())).thenReturn(null); in testStartDppAsConfiguratorInitiatorWithBadNetworkId()
215 verify(mDppCallback, never()).onSuccess(anyInt()); in testStartDppAsConfiguratorInitiatorWithBadNetworkId()
216 verify(mDppCallback, never()).onSuccessConfigReceived(anyInt()); in testStartDppAsConfiguratorInitiatorWithBadNetworkId()
[all …]
DDeviceConfigFacadeTest.java83 when(DeviceConfig.getInt(anyString(), anyString(), anyInt())) in setUp()
251 anyInt())).thenReturn(100); in testFieldUpdates()
253 anyInt())).thenReturn(0); in testFieldUpdates()
255 anyInt())).thenReturn(1000); in testFieldUpdates()
257 anyInt())).thenReturn(1500); in testFieldUpdates()
259 anyInt())).thenReturn(95); in testFieldUpdates()
261 anyInt())).thenReturn(80); in testFieldUpdates()
263 anyInt())).thenReturn(4000); in testFieldUpdates()
265 anyInt())).thenReturn(8000); in testFieldUpdates()
267 anyInt())).thenReturn(5000); in testFieldUpdates()
[all …]
DWifiConfigStoreTest.java252 when(mPackageManager.getNameForUid(anyInt())).thenReturn(TEST_CREATOR_NAME); in setupMocks()
271 when(WifiMigration.convertAndRetrieveSharedConfigStoreFile(anyInt())).thenReturn(null); in setupMocks()
272 when(WifiMigration.convertAndRetrieveUserConfigStoreFile(anyInt(), any())).thenReturn(null); in setupMocks()
315 verify(mWifiMetrics, never()).noteWifiConfigStoreWriteDuration(anyInt()); in testWriteWithNoStoreData()
337 verify(mWifiMetrics).noteWifiConfigStoreWriteDuration(anyInt()); in testForceWrite()
367 verify(mWifiMetrics, times(2)).noteWifiConfigStoreReadDuration(anyInt()); in testReadAfterWrite()
368 verify(mWifiMetrics).noteWifiConfigStoreWriteDuration(anyInt()); in testReadAfterWrite()
394 verify(sharedStoreData).deserializeData(eq(null), anyInt(), anyInt(), any()); in testReadWithNoSharedStoreFileAndUserStoreNotVisible()
396 verify(userStoreData, never()).deserializeData(any(), anyInt(), anyInt(), any()); in testReadWithNoSharedStoreFileAndUserStoreNotVisible()
423 verify(userStoreData).deserializeData(eq(null), anyInt(), anyInt(), any()); in testReadWithNoStoreFiles()
[all …]
DWifiServiceImplTest.java98 import static org.mockito.Mockito.anyInt;
572 when(mPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn(mPackageInfo); in setUp()
573 when(mPackageManager.checkSignatures(anyInt(), anyInt())) in setUp()
588 when(mContext.createContextAsUser(eq(UserHandle.CURRENT), anyInt())) in setUp()
637 when(mClientModeManager.syncStartSubscriptionProvisioning(anyInt(), in setUp()
644 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_DENIED); in setUp()
646 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_DENIED); in setUp()
648 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_DENIED); in setUp()
650 anyInt(), anyInt())).thenReturn(PackageManager.PERMISSION_DENIED); in setUp()
651 when(mScanRequestProxy.startScan(anyInt(), anyString())).thenReturn(true); in setUp()
[all …]
DOpenNetworkNotifierTest.java31 import static org.mockito.Mockito.anyInt;
142 when(mWifiConfigManager.addOrUpdateNetwork(any(), anyInt())) in setUp()
185 verify(mWifiNotificationManager).notify(anyInt(), any()); in handleScanResults_hasOpenNetworks_notificationDisplayed()
195 verify(mWifiNotificationManager, never()).notify(anyInt(), any()); in handleScanResults_emptyList_notificationNotDisplayed()
208 verify(mWifiNotificationManager, never()).notify(anyInt(), any()); in handleScanResults_featureDisabled_notificationNotDisplayed()
223 verify(mWifiNotificationManager).notify(anyInt(), any()); in handleScanResults_notificationShown_emptyList_notificationCleared()
227 verify(mWifiNotificationManager).cancel(anyInt()); in handleScanResults_notificationShown_emptyList_notificationCleared()
242 verify(mWifiNotificationManager).notify(anyInt(), any()); in handleScanResults_notificationShown_noRecommendation_notificationCleared()
247 verify(mWifiNotificationManager).cancel(anyInt()); in handleScanResults_notificationShown_noRecommendation_notificationCleared()
262 verify(mWifiNotificationManager).notify(anyInt(), any()); in handleScanResults_notificationShown_screenOff_emptyList_notificationCleared()
[all …]
DSupplicantStaNetworkCallbackAidlImplTest.java22 import static org.mockito.Mockito.anyInt;
115 any(), anyInt(), any(), anyInt(), any()); in testOnCertificateIllegalInput()
121 any(), anyInt(), any(), anyInt(), any()); in testOnCertificateIllegalInput()
127 any(), anyInt(), any(), anyInt(), any()); in testOnCertificateIllegalInput()
133 any(), anyInt(), any(), anyInt(), any()); in testOnCertificateIllegalInput()
139 any(), anyInt(), any(), anyInt(), any()); in testOnCertificateIllegalInput()
150 any(), anyInt(), any(), anyInt(), any()); in testOnCertificateWithCertificateException()
161 any(), anyInt(), any(), anyInt(), any()); in testOnCertificateWithIllegalArgumentException()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/internal/property/
DCarPropertyEventCallbackControllerUnitTest.java22 import static org.mockito.ArgumentMatchers.anyInt;
203 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt()); in testOnEvent_changeEvent_doesNothingIfNoPropertiesAdded()
204 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt(), anyInt()); in testOnEvent_changeEvent_doesNothingIfNoPropertiesAdded()
216 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt()); in testOnEvent_changeEvent_forwardsToCallback()
217 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt(), anyInt()); in testOnEvent_changeEvent_forwardsToCallback()
235 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt()); in testOnEvent_changeEvent_forwardsMultipleEvents()
236 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt(), anyInt()); in testOnEvent_changeEvent_forwardsMultipleEvents()
251 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt()); in testOnEvent_changeEvent_skipsStaleCarPropertyValues()
252 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt(), anyInt()); in testOnEvent_changeEvent_skipsStaleCarPropertyValues()
268 verify(mCarPropertyEventCallback, never()).onErrorEvent(anyInt(), anyInt()); in testOnEvent_changeEvent_skipsCarPropertyValuesWithNonZeroUpdateRate()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/access/
DForegroundEnforcementAccessResolverTest.java25 import static org.mockito.ArgumentMatchers.anyInt;
74 .assertCallerIsInForeground(anyInt(), anyInt(), any()); in testIsAllowed_flagEnforced_assertCallerForeground()
85 verify(mAppImportanceFilter, never()).assertCallerIsInForeground(anyInt(), anyInt(), any()); in testIsAllowed_flagNotEnforced_dontAssertCallerForeground()
93 .when(() -> ProcessCompatUtils.isSdkSandboxUid(anyInt())); in testIsAllowed_callerNotSandbox_assertCallerForeground()
102 .assertCallerIsInForeground(anyInt(), anyInt(), any()); in testIsAllowed_callerNotSandbox_assertCallerForeground()
108 ExtendedMockito.doReturn(true).when(() -> ProcessCompatUtils.isSdkSandboxUid(anyInt())); in testIsAllowed_callerIsSandbox_dontAssertCallerForeground()
117 .assertCallerIsInForeground(anyInt(), anyInt(), any()); in testIsAllowed_callerIsSandbox_dontAssertCallerForeground()
125 .assertCallerIsInForeground(anyInt(), anyInt(), any()); in testIsAllowed_isForeground_returnTrue()
136 .assertCallerIsInForeground(anyInt(), anyInt(), any()); in testIsAllowed_isForeground_returnTrue()
144 .assertCallerIsInForeground(anyInt(), anyInt(), any()); in testIsAllowed_isNotForeground_returnFalse()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarAudioPolicyVolumeCallbackTest.java37 import static org.mockito.ArgumentMatchers.anyInt;
108 when(mMockVolumeInfoWrapper.getVolumeGroupIdForAudioZone(anyInt())) in setUp()
110 when(mMockVolumeInfoWrapper.getGroupMaxVolume(anyInt(), anyInt())) in setUp()
112 when(mMockVolumeInfoWrapper.getGroupMinVolume(anyInt(), anyInt())) in setUp()
246 .onGroupVolumeChange(anyInt(), anyInt(), anyInt(), anyInt()); in onVolumeAdjustment_withAdjustRaiseForInvalidGroup()
260 .onGroupVolumeChange(anyInt(), anyInt(), anyInt(), anyInt()); in onVolumeAdjustment_withAdjustLowerForInvalidGroup()
274 .onMuteChange(anyBoolean(), anyInt(), anyInt(), anyInt()); in onVolumeAdjustment_withAdjustMuteForInvalidGroup()
299 .onGroupVolumeChange(anyInt(), anyInt(), anyInt(), anyInt()); in onVolumeAdjustment_withAdjustSame_doesNothing()
381 when(mMockOemVolumeService.getSuggestedGroupForVolumeChange(any(), anyInt())) in onVolumeAdjustment_withOemVolumeService_withEmptyChange()
386 verify(mVolumeCallbackInternal, never()).onMuteChange(anyBoolean(), anyInt(), anyInt(), in onVolumeAdjustment_withOemVolumeService_withEmptyChange()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryOptimizeUtilsTest.java28 import static org.mockito.Mockito.anyInt;
105 when(mMockBackend.isAllowlisted(anyString(), anyInt())).thenReturn(false); in testGetAppOptimizationMode_returnRestricted()
106 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testGetAppOptimizationMode_returnRestricted()
114 when(mMockBackend.isAllowlisted(anyString(), anyInt())).thenReturn(true); in testGetAppOptimizationMode_returnUnrestricted()
115 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testGetAppOptimizationMode_returnUnrestricted()
123 when(mMockBackend.isAllowlisted(anyString(), anyInt())).thenReturn(false); in testGetAppOptimizationMode_returnOptimized()
124 when(mMockAppOpsManager.checkOpNoThrow(anyInt(), anyInt(), anyString())) in testGetAppOptimizationMode_returnOptimized()
132 when(mMockBackend.isAllowlisted(anyString(), anyInt())).thenReturn(true); in testIsSystemOrDefaultApp_isSystemOrDefaultApp_returnTrue()
133 when(mMockBackend.isDefaultActiveApp(anyString(), anyInt())).thenReturn(true); in testIsSystemOrDefaultApp_isSystemOrDefaultApp_returnTrue()
159 when(mMockBackend.isAllowlisted(anyString(), anyInt())).thenReturn(true); in testSetAppUsageState_Restricted_verifyAction()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/
DChangeScreenLockPreferenceControllerTest.java21 import static org.mockito.ArgumentMatchers.anyInt;
105 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false); in updateState_notSecureDisableKeyguard_shouldNotShowGear()
106 when(mLockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true); in updateState_notSecureDisableKeyguard_shouldNotShowGear()
116 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false); in updateState_notSecureDisableKeyguard_summaryShouldShowOff()
117 when(mLockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true); in updateState_notSecureDisableKeyguard_summaryShouldShowOff()
128 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false); in updateState_notSecureWithSwipeKeyguard_shouldNotShowGear()
129 when(mLockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(false); in updateState_notSecureWithSwipeKeyguard_shouldNotShowGear()
139 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false); in updateState_notSecureWithSwipeKeyguard_summaryShouldShowSwipe()
140 when(mLockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(false); in updateState_notSecureWithSwipeKeyguard_summaryShouldShowSwipe()
151 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(true); in updateState_secureWithPinKeyguard_shouldShowGear()
[all …]
/packages/services/Telephony/tests/src/com/android/phone/
DImsStateCallbackControllerTest.java36 import static org.mockito.Matchers.anyInt;
500 verify(mCallback0, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
501 verify(mCallback1, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
502 verify(mCallback2, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
509 verify(mCallback0, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
510 verify(mCallback1, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
511 verify(mCallback2, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
523 verify(mCallback0, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
524 verify(mCallback1, times(2)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
525 verify(mCallback2, times(1)).onUnavailable(anyInt()); in testCarrierConfigurationChanged()
[all …]
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/userpicker/
DUserPickerControllerTest.java29 import static org.mockito.ArgumentMatchers.anyInt;
170 .startUserForDisplay(anyInt(), anyInt(), anyInt(), anyBoolean()); in loginItself_changeUserState_finishUserPicker()
177 doReturn(snackbar).when(() -> Snackbar.make(any(View.class), any(String.class), anyInt())); in checkSnackbar_loginDriverUser_showSnackbar()
184 .startUserForDisplay(anyInt(), anyInt(), anyInt(), anyBoolean()); in checkSnackbar_loginDriverUser_showSnackbar()
196 .startUserForDisplay(anyInt(), eq(USER_ID_REAR), anyInt(), anyBoolean()); in checkSwitchUser_changeUserState_switchUser()
201 doReturn(true).when(mMockUserEventManager).stopUserUnchecked(anyInt(), anyInt()); in checkChangeUser_changeUserState_changeUser()
209 .startUserForDisplay(anyInt(), eq(USER_ID_REAR), anyInt(), anyBoolean()); in checkChangeUser_changeUserState_changeUser()
214 doReturn(true).when(mMockUserEventManager).stopUserUnchecked(anyInt(), anyInt()); in checkLoginUser_logoutState_startUser()
220 .stopUserUnchecked(anyInt(), anyInt()); in checkLoginUser_logoutState_startUser()
222 .startUserForDisplay(anyInt(), eq(USER_ID_REAR), anyInt(), anyBoolean()); in checkLoginUser_logoutState_startUser()
[all …]
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/toast/
DCarToastUITest.java20 import static org.mockito.ArgumentMatchers.anyInt;
99 when(mToastFactory.createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), anyInt())) in setUp()
119 verify(mToastFactory, never()).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), in showToast_notSystemNotPrivilegedNotPlatformKey_createToastNotCalled()
120 anyInt()); in showToast_notSystemNotPrivilegedNotPlatformKey_createToastNotCalled()
132 verify(mToastFactory).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), anyInt()); in showToast_notSystemNotPrivilegedIsPlatformKey_createToastCalled()
144 verify(mToastFactory, never()).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), in showToast_notSystemIsPrivilegedNotPlatformKey_createToastNotCalled()
145 anyInt()); in showToast_notSystemIsPrivilegedNotPlatformKey_createToastNotCalled()
157 verify(mToastFactory).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), anyInt()); in showToast_notSystemIsPrivilegedIsPlatformKey_createToastCalled()
169 verify(mToastFactory, never()).createToast(any(), eq(TEXT), eq(PACKAGE_NAME), anyInt(), in showToast_isSystemNotPrivilegedNotPlatformKey_createToastNotCalled()
170 anyInt()); in showToast_isSystemNotPrivilegedNotPlatformKey_createToastNotCalled()
[all …]
/packages/modules/AdServices/adservices/tests/test-util/java/com/android/adservices/mockito/
DMockitoExpectations.java24 import static org.mockito.ArgumentMatchers.anyInt;
99 verify(logger, never()).persistJobExecutionData(anyInt(), anyLong()); in verifyLoggingNotHappened()
100 verify(logger, never()).logExecutionStats(anyInt(), anyLong(), anyInt(), anyInt()); in verifyLoggingNotHappened()
109 verify(logger).recordJobSkipped(anyInt(), anyInt()); in verifyBackgroundJobsSkipLogged()
131 verify(logger).recordOnStopJob(any(), anyInt(), anyBoolean()); in verifyOnStopJobLogged()
191 .recordOnStartJob(anyInt()); in syncPersistJobExecutionData()
218 .recordOnStopJob(any(), anyInt(), anyBoolean()); in syncLogExecutionStats()
226 .recordJobSkipped(anyInt(), anyInt()); in syncLogExecutionStats()
234 .recordJobFinished(anyInt(), anyBoolean(), anyBoolean()); in syncLogExecutionStats()
247 verify(logger).recordOnStartJob(anyInt()); in verifyOnStartJobLogged()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/common/src/com/android/adservices/spe/
DAdServicesStatsdJobServiceLoggerTest.java26 import static org.mockito.ArgumentMatchers.anyInt;
56 anyInt(), anyInt(), anyInt(), anyInt(), anyInt(), anyInt(), in testLogExecutionReportedStats()
57 anyInt())); in testLogExecutionReportedStats()
95 anyInt(), anyInt(), anyInt(), anyInt(), anyInt())); in testLogSchedulingReportedStats()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/evict/
DSignalEvictionControllerTest.java20 import static org.mockito.ArgumentMatchers.anyInt;
60 when(mSignalEvictorMock1.evict(any(), any(), any(), anyInt(), anyInt())).thenReturn(false); in evict_3Evictor_firstReturnFalse()
64 verify(mSignalEvictorMock1).evict(any(), any(), any(), anyInt(), anyInt()); in evict_3Evictor_firstReturnFalse()
70 when(mSignalEvictorMock1.evict(any(), any(), any(), anyInt(), anyInt())).thenReturn(true); in evict_3Evictor_firstReturnTrueAndSecondReturnFalse()
71 when(mSignalEvictorMock2.evict(any(), any(), any(), anyInt(), anyInt())).thenReturn(false); in evict_3Evictor_firstReturnTrueAndSecondReturnFalse()
75 verify(mSignalEvictorMock1).evict(any(), any(), any(), anyInt(), anyInt()); in evict_3Evictor_firstReturnTrueAndSecondReturnFalse()
76 verify(mSignalEvictorMock2).evict(any(), any(), any(), anyInt(), anyInt()); in evict_3Evictor_firstReturnTrueAndSecondReturnFalse()
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/combination/
DCombinedBiometricStatusUtilsTest.java24 import static org.mockito.ArgumentMatchers.anyInt;
141 when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(false); in hasEnrolled_withoutFingerprintEnroll_withoutFaceEnroll_returnsFalse()
142 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false); in hasEnrolled_withoutFingerprintEnroll_withoutFaceEnroll_returnsFalse()
151 when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(false); in hasEnrolled_withoutFingerprintEnroll_withFaceEnroll_returnsTrue()
152 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true); in hasEnrolled_withoutFingerprintEnroll_withFaceEnroll_returnsTrue()
161 when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(true); in hasEnrolled_withFingerprintEnroll_withoutFaceEnroll_returnsTrue()
162 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(false); in hasEnrolled_withFingerprintEnroll_withoutFaceEnroll_returnsTrue()
171 when(mFingerprintManager.hasEnrolledFingerprints(anyInt())).thenReturn(true); in hasEnrolled_withFingerprintEnroll_withFaceEnroll_returnsTrue()
172 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true); in hasEnrolled_withFingerprintEnroll_withFaceEnroll_returnsTrue()
214 when(mFaceManager.hasEnrolledTemplates(anyInt())).thenReturn(true); in getSummary_whenFaceEnrolled_whenMultipleFingerprints_returnsBothFpMultiple()
[all …]
/packages/modules/Connectivity/tests/unit/java/android/net/
DConnectivityManagerTest.java53 import static org.mockito.Mockito.anyInt;
242 when(mService.requestNetwork(anyInt(), any(), anyInt(), captor.capture(), anyInt(), any(), in testCallbackRelease()
243 anyInt(), anyInt(), any(), nullable(String.class))).thenReturn(request); in testCallbackRelease()
257 verify(callback, after(SHORT_TIMEOUT_MS).never()).onLosing(any(), anyInt()); in testCallbackRelease()
271 when(mService.requestNetwork(anyInt(), any(), anyInt(), captor.capture(), anyInt(), any(), in testCallbackRecycling()
272 anyInt(), anyInt(), any(), nullable(String.class))).thenReturn(req1); in testCallbackRecycling()
286 verify(callback, after(SHORT_TIMEOUT_MS).never()).onLosing(any(), anyInt()); in testCallbackRecycling()
289 when(mService.requestNetwork(anyInt(), any(), anyInt(), captor.capture(), anyInt(), any(), in testCallbackRecycling()
290 anyInt(), anyInt(), any(), nullable(String.class))).thenReturn(req2); in testCallbackRecycling()
313 when(mService.requestNetwork(anyInt(), any(), anyInt(), any(), anyInt(), any(), anyInt(), in noDoubleCallbackRegistration()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DRecentAppStatsMixinTest.java22 import static org.mockito.ArgumentMatchers.anyInt;
101 when(mUserManager.getProfileIdsWithDisabled(anyInt())).thenReturn(new int[]{}); in setUp()
103 doReturn(mMockContext).when(mContext).createContextAsUser(any(), anyInt()); in setUp()
104 doReturn(mMockContext).when(mContext).createPackageContextAsUser(any(), anyInt(), any()); in setUp()
121 when(mPackageManager.resolveActivityAsUser(any(Intent.class), anyInt(), anyInt())) in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp()
123 when(mUsageStatsManager.queryUsageStats(anyInt(), anyLong(), anyLong())) in loadDisplayableRecentApps_oneValidRecentAppSet_shouldHaveOneRecentApp()
156 when(mPackageManager.resolveActivityAsUser(any(Intent.class), anyInt(), anyInt())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
158 when(mUsageStatsManager.queryUsageStats(anyInt(), anyLong(), anyLong())) in loadDisplayableRecentApps_threeValidRecentAppsSet_shouldHaveThreeRecentApps()
192 when(mPackageManager.resolveActivityAsUser(any(Intent.class), anyInt(), anyInt())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp()
194 when(mUsageStatsManager.queryUsageStats(anyInt(), anyLong(), anyLong())) in loadDisplayableRecentApps_oneValidAndTwoInvalidSet_shouldHaveOneRecentApp()
[all …]
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/hvac/
DFanSpeedBarTest.java23 import static org.mockito.ArgumentMatchers.anyInt;
167 verify(mHvacPropertySetter, never()).setHvacProperty(anyInt(), anyInt(), anyInt()); in onClickOffButton_doesNotAllowsControl_doesNotSetNewValue()
179 verify(mHvacPropertySetter, never()).setHvacProperty(anyInt(), anyInt(), anyInt()); in onClickSpeedOneButton_doesNotAllowsControl_doesNotSetNewValue()
191 verify(mHvacPropertySetter, never()).setHvacProperty(anyInt(), anyInt(), anyInt()); in onClickSpeedTwoButton_doesNotAllowsControl_doesNotSetNewValue()
203 verify(mHvacPropertySetter, never()).setHvacProperty(anyInt(), anyInt(), anyInt()); in onClickSpeedThreeButton_doesNotAllowsControl_doesNotSetNewValue()
215 verify(mHvacPropertySetter, never()).setHvacProperty(anyInt(), anyInt(), anyInt()); in onClickSpeedFourButton_doesNotAllowsControl_doesNotSetNewValue()
227 verify(mHvacPropertySetter, never()).setHvacProperty(anyInt(), anyInt(), anyInt()); in onClickMaxButton_doesNotAllowsControl_doesNotSetNewValue()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DStartDpcInsideSuwServiceConnectionTest.java27 import static org.mockito.Matchers.anyInt;
84 when(mUtils.canResolveIntentAsUser(any(Context.class), any(Intent.class), anyInt())) in setUp()
94 when(mActivity.getSharedPreferences(anyString(), anyInt())).thenReturn(mSharedPreferences); in setUp()
96 when(mRestoredActivity.getSharedPreferences(anyString(), anyInt())) in setUp()
111 when(mActivity.bindService(any(Intent.class), any(ServiceConnection.class), anyInt())) in testBindingSucceeds_serviceConnects()
137 when(mActivity.bindService(any(Intent.class), any(ServiceConnection.class), anyInt())) in testBindingSucceeds_instanceStateSavedAndRestoredBeforeServiceConnected()
156 any(Intent.class), any(ServiceConnection.class), anyInt())).thenReturn(true); in testBindingSucceeds_instanceStateSavedAndRestoredBeforeServiceConnected()
182 when(mActivity.bindService(any(Intent.class), any(ServiceConnection.class), anyInt())) in testBindingSucceeds_instanceStateSavedAndRestoredAfterServiceConnected()
207 any(Intent.class), any(ServiceConnection.class), anyInt())).thenReturn(true); in testBindingSucceeds_instanceStateSavedAndRestoredAfterServiceConnected()
220 verify(mRestoredActivity, never()).startActivityForResultAsUser(any(Intent.class), anyInt(), in testBindingSucceeds_instanceStateSavedAndRestoredAfterServiceConnected()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/screenlock/
DLockScreenPreferenceControllerTest.java28 import static org.mockito.ArgumentMatchers.anyInt;
80 when(mUm.getProfileIdsWithDisabled(anyInt())).thenReturn(new int[] {FAKE_PROFILE_USER_ID}); in setUp()
90 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false); in getAvailabilityStatus_notSecure_lockscreenDisabled_AVAILABLE()
91 when(mLockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(true); in getAvailabilityStatus_notSecure_lockscreenDisabled_AVAILABLE()
98 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(false); in getAvailabilityStatus_notSecure_lockscreenEnabled_AVAILABLE()
99 when(mLockPatternUtils.isLockScreenDisabled(anyInt())).thenReturn(false); in getAvailabilityStatus_notSecure_lockscreenEnabled_AVAILABLE()
106 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(true); in getAvailabilityStatus_secure_hasLockScreen_AVAILABLE()
107 when(mLockPatternUtils.getKeyguardStoredPasswordQuality(anyInt())) in getAvailabilityStatus_secure_hasLockScreen_AVAILABLE()
115 when(mLockPatternUtils.isSecure(anyInt())).thenReturn(true); in getAvailabilityStatus_secure_noLockScreen_AVAILABLE()
116 when(mLockPatternUtils.getKeyguardStoredPasswordQuality(anyInt())) in getAvailabilityStatus_secure_noLockScreen_AVAILABLE()
[all …]

12345678910>>...50