HomeSort by relevance Sort by last modified time
    Searched refs:thenReturn (Results 26 - 50 of 154) sorted by null

12 3 4 5 6 7

  /packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/common/
MdmPackageInfoTest.java 51 when(mockContext.getPackageManager()).thenReturn(mockPackageManager);
53 .thenReturn(mApplicationInfo);
54 when(mockPackageManager.getApplicationIcon(TEST_PACKAGE_NAME)).thenReturn(TEST_DRAWABLE);
55 when(mockPackageManager.getApplicationLabel(mApplicationInfo)).thenReturn(TEST_LABEL);
UtilsTest.java 88 when(mockContext.getSystemService(Context.ACCOUNT_SERVICE)).thenReturn(mockAccountManager);
89 when(mockContext.getPackageManager()).thenReturn(mockPackageManager);
91 .thenReturn(mockConnectivityManager);
103 .thenReturn(new ParceledListSlice(appList));
138 when(mockPackageManager.getPackageInfo(TEST_PACKAGE_NAME_1, 0)).thenReturn(pi);
155 when(mockResult.getResult(anyLong(), any(TimeUnit.class))).thenReturn(true);
158 .thenReturn(mockResult);
176 when(mockResult.getResult(anyLong(), any(TimeUnit.class))).thenReturn(false);
179 .thenReturn(mockResult);
202 .thenReturn(mockResult)
    [all...]
  /frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
CarrierAppUtilsTest.java 85 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(null);
103 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo);
127 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo);
129 .thenReturn(TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS);
147 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo);
149 .thenReturn(TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS);
167 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo);
169 .thenReturn(TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS);
187 PackageManager.MATCH_DISABLED_UNTIL_USED_COMPONENTS, USER_ID)).thenReturn(appInfo);
189 .thenReturn(TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS)
    [all...]
  /external/mockito/src/org/mockito/internal/stubbing/
BaseStubbing.java 15 public OngoingStubbing<T> thenReturn(T value) {
19 public OngoingStubbing<T> thenReturn(T value, T... values) {
20 OngoingStubbing<T> stubbing = thenReturn(value);
22 return stubbing.thenReturn(null);
25 stubbing = stubbing.thenReturn(v);
  /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
WifiControllerTest.java 76 when(mSettingsStore.isAirplaneModeOn()).thenReturn(false);
77 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(false);
78 when(mSettingsStore.isScanAlwaysAvailable()).thenReturn(true);
99 when(mContext.getContentResolver()).thenReturn(mock(ContentResolver.class));
117 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(true);
122 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(false);
127 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(true);
138 when(mFacade.getConfigWiFiDisableInECBM(mContext)).thenReturn(true);
147 when(mFacade.getConfigWiFiDisableInECBM(mContext)).thenReturn(false);
237 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(true)
    [all...]
  /packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/task/
SetDevicePolicyTaskTest.java 56 when(mContext.getPackageManager()).thenReturn(mPackageManager);
58 .thenReturn(mDevicePolicyManager);
60 .thenReturn(PackageManager.COMPONENT_ENABLED_STATE_DEFAULT);
61 when(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser()).thenReturn(null);
63 .thenReturn(true);
71 .thenReturn(PackageManager.COMPONENT_ENABLED_STATE_DISABLED);
113 .thenReturn(false);
  /frameworks/base/packages/SettingsLib/tests/src/com/android/settingslib/wifi/
WifiTrackerTest.java 80 Mockito.when(mWifiManager.isWifiEnabled()).thenReturn(true);
124 Mockito.when(mWifiManager.startScan()).thenReturn(true);
139 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
140 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults);
163 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
164 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults);
187 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
188 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults);
211 Mockito.when(mWifiManager.getConfiguredNetworks()).thenReturn(wifiConfigs);
212 Mockito.when(mWifiManager.getScanResults()).thenReturn(scanResults)
    [all...]
  /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
NetworkControllerBaseTest.java 86 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(true);
87 when(mMockCm.getDefaultNetworkCapabilitiesForUser(0)).thenReturn(
111 when(mMockTm.getDataEnabled(mSubId)).thenReturn(true);
120 when(mMockSubDefaults.getDefaultDataSubId()).thenReturn(subId);
121 when(mMockSubDefaults.getDefaultVoiceSubId()).thenReturn(subId);
128 when(subscription.getSubscriptionId()).thenReturn(subId);
131 when(mMockSm.getActiveSubscriptionInfoList()).thenReturn(subs);
136 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false);
188 when(mServiceState.getRoaming()).thenReturn(isRoaming);
193 when(mServiceState.getCdmaEriIconIndex()).thenReturn(isRoaming
    [all...]
  /packages/apps/Messaging/tests/src/com/android/messaging/ui/mediapicker/
GalleryGridItemViewTest.java 74 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(false);
76 .thenReturn(false);
87 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(true);
89 .thenReturn(false);
100 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(true);
102 .thenReturn(true);
113 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(false);
115 .thenReturn(false);
125 Mockito.when(mockHost.isMultiSelectEnabled()).thenReturn(true);
127 .thenReturn(false)
    [all...]
AudioRecordViewTest.java 58 Mockito.when(mockRecorder.isRecording()).thenReturn(false);
60 Matchers.<OnInfoListener>any(), Matchers.anyInt())).thenReturn(true);
61 Mockito.when(mockRecorder.stopRecording()).thenReturn(Uri.parse("content://someaudio/2"));
66 Mockito.when(mockRecorder.isRecording()).thenReturn(true);
  /packages/apps/Dialer/tests/src/com/android/dialer/compat/
FilteredNumberCompatTest.java 67 when(mContext.getSharedPreferences(anyString(), anyInt())).thenReturn(mSharedPreferences);
88 .thenReturn(true);
104 .thenReturn(true);
146 .thenReturn(true);
224 .thenReturn(true);
235 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(userManager);
236 when(userManager.isSystemUser()).thenReturn(false);
247 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(userManager);
248 when(userManager.isSystemUser()).thenReturn(true);
259 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(userManager)
    [all...]
  /packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
CallLogManagerTest.java 140 when(userManager.isUserRunning(any(UserHandle.class))).thenReturn(true);
141 when(userManager.isUserUnlocked(any(UserHandle.class))).thenReturn(true);
143 .thenReturn(false);
145 .thenReturn(Arrays.asList(userInfo, otherUserInfo, managedProfileUserInfo));
146 when(userManager.getUserInfo(eq(CURRENT_USER_ID))).thenReturn(userInfo);
147 when(userManager.getUserInfo(eq(OTHER_USER_ID))).thenReturn(otherUserInfo);
148 when(userManager.getUserInfo(eq(MANAGED_USER_ID))).thenReturn(managedProfileUserInfo);
175 .thenReturn(makeFakePhoneAccount(mDefaultAccountHandle, CURRENT_USER_ID));
197 .thenReturn(makeFakePhoneAccount(EMERGENCY_ACCT_HANDLE, 0));
220 .thenReturn(makeFakePhoneAccount(mDefaultAccountHandle, CURRENT_USER_ID))
    [all...]
SystemStateProviderTest.java 74 when(mContext.getSystemService(Context.UI_MODE_SERVICE)).thenReturn(mUiModeManager);
75 when(mUiModeManager.getCurrentModeType()).thenReturn(Configuration.UI_MODE_TYPE_CAR);
81 when(mContext.getSystemService(Context.UI_MODE_SERVICE)).thenReturn(mUiModeManager);
82 when(mUiModeManager.getCurrentModeType()).thenReturn(Configuration.UI_MODE_TYPE_NORMAL);
105 when(mIntentEnter.getAction()).thenReturn(UiModeManager.ACTION_ENTER_CAR_MODE);
109 when(mIntentExit.getAction()).thenReturn(UiModeManager.ACTION_EXIT_CAR_MODE);
TelecomServiceImplTest.java 197 when(mTelecomManager.getDefaultDialerPackage()).thenReturn(DEFAULT_DIALER_PACKAGE);
198 when(mTelecomManager.getSystemDialerPackage()).thenReturn(DEFAULT_DIALER_PACKAGE);
216 .thenReturn(TEL_PA_HANDLE_16);
219 .thenReturn(SIP_PA_HANDLE_17);
238 .thenReturn(TEL_PA_HANDLE_16);
239 when(mFakePhoneAccountRegistrar.getPhoneAccountUnchecked(TEL_PA_HANDLE_16)).thenReturn(
242 .thenReturn(AppOpsManager.MODE_IGNORED);
254 .thenReturn(TEL_PA_HANDLE_16);
255 when(mFakePhoneAccountRegistrar.getPhoneAccountUnchecked(TEL_PA_HANDLE_16)).thenReturn(
297 .thenReturn(fullPHList)
    [all...]
  /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/external/
TileServiceManagerTests.java 42 Mockito.when(mTileServices.getContext()).thenReturn(mContext);
44 Mockito.when(mTileLifecycle.isActiveTile()).thenReturn(false);
47 Mockito.when(mTileLifecycle.getComponent()).thenReturn(componentName);
76 Mockito.when(mTileLifecycle.hasPendingClick()).thenReturn(true);
  /packages/apps/Dialer/InCallUI/tests/src/com/android/incallui/
ExternalCallNotifierTest.java 79 .thenReturn(ContactsPreferences.DISPLAY_ORDER_PRIMARY);
85 .thenReturn(mNotificationManager);
87 .thenReturn(mTelecomManager);
89 .thenReturn(mTelephonyManager);
93 when(mMockContext.getPackageManager()).thenReturn(mContext.getPackageManager());
94 when(mMockContext.getResources()).thenReturn(mContext.getResources());
95 when(mMockContext.getApplicationInfo()).thenReturn(mContext.getApplicationInfo());
96 when(mMockContext.getContentResolver()).thenReturn(mContext.getContentResolver());
97 when(mMockContext.getPackageName()).thenReturn(mContext.getPackageName());
MockCallListWrapper.java 74 when(call.getState()).thenReturn(Integer.valueOf(state));
76 when(call.getAccountHandle()).thenReturn(new PhoneAccountHandle(null, null));
  /packages/services/Telephony/tests/src/com/android/services/telephony/
EmergencyCallStateListenerTest.java 84 when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
100 when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
101 when(mMockPhone.getServiceState()).thenReturn(state);
116 when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
117 when(mMockPhone.getServiceState()).thenReturn(state);
135 when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
136 when(mMockPhone.getServiceState()).thenReturn(state);
150 when(mMockPhone.getState()).thenReturn(PhoneConstants.State.IDLE);
151 when(mMockPhone.getServiceState()).thenReturn(state);
  /external/dagger2/producers/src/test/java/dagger/producers/monitoring/internal/
MonitorsTest.java 67 when(mockProductionComponentMonitorFactory.create(any(Object.class))).thenReturn(null);
88 .thenReturn(mockProductionComponentMonitor);
90 .thenReturn(null);
102 .thenReturn(mockProductionComponentMonitor);
206 when(mockProductionComponentMonitorFactoryA.create(any(Object.class))).thenReturn(null);
207 when(mockProductionComponentMonitorFactoryB.create(any(Object.class))).thenReturn(null);
208 when(mockProductionComponentMonitorFactoryC.create(any(Object.class))).thenReturn(null);
241 .thenReturn(mockProductionComponentMonitorA);
242 when(mockProductionComponentMonitorFactoryB.create(any(Object.class))).thenReturn(null);
243 when(mockProductionComponentMonitorFactoryC.create(any(Object.class))).thenReturn(null)
    [all...]
  /external/guice/extensions/persist/test/com/google/inject/persist/jpa/
JpaPersistServiceTest.java 44 when(provider.createEntityManagerFactory(PERSISTENCE_UNIT_NAME, PERSISTENCE_PROPERTIES)).thenReturn(factory);
45 when(factory.createEntityManager()).thenReturn(entityManager);
  /packages/apps/ContactsCommon/tests/src/com/android/contacts/common/util/
ContactDisplayUtilTests.java 132 .thenReturn(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE);
138 Mockito.when(mContactsPreferences.getDisplayOrder()).thenReturn(-1);
145 .thenReturn(ContactsPreferences.DISPLAY_ORDER_PRIMARY);
152 .thenReturn(ContactsPreferences.DISPLAY_ORDER_ALTERNATIVE);
178 .thenReturn(ContactsPreferences.SORT_ORDER_ALTERNATIVE);
184 Mockito.when(mContactsPreferences.getSortOrder()).thenReturn(-1);
191 .thenReturn(ContactsPreferences.SORT_ORDER_PRIMARY);
198 .thenReturn(ContactsPreferences.SORT_ORDER_ALTERNATIVE);
  /packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/uiflows/
EncryptionControllerTest.java 82 when(mUtils.isPhysicalDeviceEncrypted()).thenReturn(true);
83 when(mContext.getApplicationContext()).thenReturn(mContext);
84 when(mContext.getPackageManager()).thenReturn(mPackageManager);
109 when(mUtils.isUserSetupCompleted(mContext)).thenReturn(true);
123 when(mUtils.isUserSetupCompleted(mContext)).thenReturn(true);
168 when(mUtils.isPhysicalDeviceEncrypted()).thenReturn(false);
180 when(mIntentStore.load()).thenReturn(null);
203 when(mIntentStore.load()).thenReturn(mIntent);
  /developers/samples/android/security/AsymmetricFingerprintDialog/Application/src/test/java/com/example/android/fingerprintdialog/
FingerprintUiHelperTest.java 53 when(mockFingerprintManager.isHardwareDetected()).thenReturn(true);
54 when(mockFingerprintManager.hasEnrolledFingerprints()).thenReturn(true);
55 when(mockTextView.getResources()).thenReturn(mockResources);
56 when(mockResources.getColor(R.color.hint_color, null)).thenReturn(HINT_COLOR);
71 when(mockFingerprintManager.isHardwareDetected()).thenReturn(false);
  /frameworks/base/services/tests/servicestests/src/android/net/metrics/
IpConnectivityLogTest.java 68 when(mService.logEvent(any())).thenReturn(1234L);
74 when(mService.logEvent(any())).thenReturn(-1L); // Error.
80 when(mService.logEvent(any())).thenReturn(Long.MAX_VALUE); // Throttled
93 when(mService.logEvent(any())).thenReturn(throttleTimeout, 0L);
109 when(mService.logEvent(any())).thenReturn(throttleTimeout, 0L);
  /frameworks/base/services/tests/servicestests/src/com/android/server/
AccessibilityManagerTest.java 63 .thenReturn(AccessibilityManager.STATE_FLAG_ACCESSIBILITY_ENABLED);
66 .thenReturn(0);
87 .thenReturn(expectedServices);
135 .thenReturn(true /* should recycle event object */)
136 .thenReturn(false /* should not recycle event object */);

Completed in 1187 milliseconds

12 3 4 5 6 7