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

1 2 3 4 5 6 7

  /packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
InCallWakeLockControllerTest.java 60 when(mCallsManager.getRingingCall()).thenReturn(mCall);
61 when(mWakeLockAdapter.isHeld()).thenReturn(false);
70 when(mCallsManager.getRingingCall()).thenReturn(null);
71 when(mWakeLockAdapter.isHeld()).thenReturn(false);
80 when(mCallsManager.getRingingCall()).thenReturn(mCall);
81 when(mWakeLockAdapter.isHeld()).thenReturn(false);
90 when(mCallsManager.getRingingCall()).thenReturn(null);
91 when(mWakeLockAdapter.isHeld()).thenReturn(false);
100 when(mCallsManager.getRingingCall()).thenReturn(null);
101 when(mWakeLockAdapter.isHeld()).thenReturn(true)
    [all...]
BluetoothPhoneServiceTest.java 138 when(mMockCallsManager.getRingingCall()).thenReturn(null);
158 when(mMockCallsManager.getForegroundCall()).thenReturn(null);
179 when(mMockCallsManager.getForegroundCall()).thenReturn(null);
193 any(PhoneAccountHandle.class))).thenReturn(fakePhoneAccount);
202 when(mMockCallsManager.getForegroundCall()).thenReturn(null);
214 any(PhoneAccountHandle.class))).thenReturn(fakePhoneAccount);
226 any(PhoneAccountHandle.class))).thenReturn(null);
228 any(PhoneAccountHandle.class))).thenReturn(null);
229 when(TelephonyManager.from(mContext).getLine1Number()).thenReturn(fakeNumber);
240 when(activeCall.getState()).thenReturn(CallState.ACTIVE)
    [all...]
ProximitySensorManagerTest.java 61 when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>(){{
64 when(mWakeLockAdapter.isHeld()).thenReturn(false);
73 when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>());
74 when(mWakeLockAdapter.isHeld()).thenReturn(false);
84 when(mWakeLockAdapter.isHeld()).thenReturn(true);
93 when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>(){{
96 when(mWakeLockAdapter.isHeld()).thenReturn(true);
105 when(mCallsManager.getCalls()).thenReturn(new ArrayList<Call>());
106 when(mWakeLockAdapter.isHeld()).thenReturn(true);
CreateConnectionProcessorTest.java 90 when(mMockCall.isEmergencyCall()).thenReturn(false);
92 when(mMockAccountRegistrar.getSimCallManagerFromCall(any(Call.class))).thenReturn(null);
110 when(mMockCall.isEmergencyCall()).thenReturn(false);
111 when(mMockCall.getTargetPhoneAccount()).thenReturn(pAHandle);
114 when(mMockAccountRegistrar.getSimCallManagerFromCall(any(Call.class))).thenReturn(null);
128 when(mMockCall.isEmergencyCall()).thenReturn(false);
135 when(mMockAccountRegistrar.getPhoneAccountUnchecked(pAHandle)).thenReturn(
153 when(mMockCall.isEmergencyCall()).thenReturn(false);
157 when(mMockCall.getConnectionManagerPhoneAccount()).thenReturn(callManagerPAHandle);
160 when(mMockAccountRegistrar.getPhoneAccountUnchecked(pAHandle)).thenReturn(
    [all...]
InCallControllerTests.java 113 when(mMockCallsManager.getCurrentUserHandle()).thenReturn(mUserHandle);
114 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager);
115 when(mMockCallsManager.hasEmergencyCall()).thenReturn(false);
116 when(mMockCall.isIncoming()).thenReturn(true);
117 when(mMockCall.isExternalCall()).thenReturn(false);
142 when(mMockCallsManager.getCurrentUserHandle()).thenReturn(mUserHandle);
143 when(mMockContext.getPackageManager()).thenReturn(mMockPackageManager);
144 when(mMockCallsManager.hasEmergencyCall()).thenReturn(false);
145 when(mMockCall.isIncoming()).thenReturn(false);
146 when(mMockCall.getTargetPhoneAccount()).thenReturn(PA_HANDLE)
    [all...]
BluetoothManagerTest.java 78 when(mHeadsetProxy.getConnectedDevices()).thenReturn(
85 when(mHeadsetProxy.getConnectedDevices()).thenReturn(
92 when(mHeadsetProxy.getConnectedDevices()).thenReturn(
99 when(mHeadsetProxy.getConnectedDevices()).thenReturn(
101 when(mHeadsetProxy.isAudioConnected(eq(device1))).thenReturn(false);
107 when(mHeadsetProxy.getConnectedDevices()).thenReturn(
109 when(mHeadsetProxy.isAudioConnected(eq(device1))).thenReturn(true);
115 when(mHeadsetProxy.getConnectedDevices()).thenReturn(
117 when(mHeadsetProxy.isAudioConnected(eq(device1))).thenReturn(false);
139 when(mHeadsetProxy.getConnectedDevices()).thenReturn(
    [all...]
  /frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
ImageReaderTest.java 85 when(mReader.acquireNextImage()).thenReturn(null);
86 when(mReader.acquireNextImageNoThrowISE()).thenReturn(null);
95 when(mReader.acquireNextImage()).thenReturn(mImage1);
96 when(mReader.acquireNextImageNoThrowISE()).thenReturn(null);
106 when(mReader.acquireNextImage()).thenReturn(mImage1);
107 when(mReader.acquireNextImageNoThrowISE()).thenReturn(mImage2).thenReturn(null);
118 when(mReader.acquireNextImage()).thenReturn(mImage1);
119 when(mReader.acquireNextImageNoThrowISE()).thenReturn(mImage2).
120 thenReturn(mImage3)
    [all...]
  /packages/apps/ContactsCommon/tests/src/com/android/contacts/common/preference/
ContactsPreferencesTest.java 52 Mockito.when(mContext.getResources()).thenReturn(mResources);
54 .thenReturn(ACCOUNT_KEY); // contact_editor_default_account_key
57 .thenReturn(mSharedPreferences);
59 .thenReturn(true);
61 .thenReturn(true);
67 Mockito.when(mResources.getBoolean(Mockito.anyInt())).thenReturn(
76 Mockito.when(mResources.getBoolean(Mockito.anyInt())).thenReturn(
80 Mockito.anyInt())).thenReturn(ContactsPreferences.SORT_ORDER_PRIMARY);
86 Mockito.when(mResources.getBoolean(Mockito.anyInt())).thenReturn(
95 Mockito.when(mResources.getBoolean(Mockito.anyInt())).thenReturn(
    [all...]
  /packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
ContactsContentObserverTest.java 73 when(mMockManager.getContactCount()).thenReturn(STALE_CONTACT_COUNT);
74 when(mMockManager.getContactCountAtLastRebuild()).thenReturn(STALE_CONTACT_COUNT);
75 when(mMockManager.getValidNames(eq(Contacts.CONTENT_URI))).thenReturn(STALE_NAMES_LIST);
76 when(mMockManager.getHashCodeAtLastRebuild()).thenReturn(STALE_NAMES_LIST.hashCode());
81 when(mMockManager.getContactCount()).thenReturn(UPDATED_CONTACT_COUNT);
82 when(mMockManager.getContactCountAtLastRebuild()).thenReturn(STALE_CONTACT_COUNT);
88 when(mMockManager.getContactCount()).thenReturn(STALE_CONTACT_COUNT);
89 when(mMockManager.getContactCountAtLastRebuild()).thenReturn(STALE_CONTACT_COUNT);
90 when(mMockManager.getValidNames(eq(Contacts.CONTENT_URI))).thenReturn(UPDATED_NAMES_LIST);
91 when(mMockManager.getHashCodeAtLastRebuild()).thenReturn(STALE_NAMES_LIST.hashCode())
    [all...]
  /frameworks/volley/src/test/java/com/android/volley/toolbox/
AndroidAuthenticatorTest.java 55 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
65 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
66 when(mFuture.getResult()).thenReturn(bundle);
67 when(mFuture.isDone()).thenReturn(true);
68 when(mFuture.isCancelled()).thenReturn(false);
75 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
76 when(mFuture.getResult()).thenReturn(bundle);
77 when(mFuture.isDone()).thenReturn(true);
78 when(mFuture.isCancelled()).thenReturn(false);
92 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture)
    [all...]
  /packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/uiflows/
PreProvisioningControllerTest.java 91 .thenReturn(mDevicePolicyManager);
92 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
93 when(mContext.getPackageManager()).thenReturn(mPackageManager);
94 when(mContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn(mActivityManager);
95 when(mContext.getSystemService(Context.KEYGUARD_SERVICE)).thenReturn(mKeyguardManager);
97 .thenReturn(mPdbManager);
98 when(mContext.getPackageName()).thenReturn(MP_PACKAGE_NAME);
100 when(mUserManager.getUserHandle()).thenReturn(TEST_USER_ID);
102 when(mUtils.isFrpSupported(mContext)).thenReturn(true);
103 when(mUtils.isSplitSystemUser()).thenReturn(false)
    [all...]
  /frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
VisualVoicemailSmsFilterTest.java 39 .thenReturn(Context.TELEPHONY_SERVICE);
40 Mockito.when(context.getSystemService(Mockito.anyString())).thenReturn(telephonyManager);
47 .thenReturn(settings);
  /external/mockito/src/org/mockito/stubbing/
OngoingStubbing.java 14 * <b>when</b>(mock.someMethod()).<b>thenReturn</b>(10);
17 * when(mock.someMethod(<b>anyString()</b>)).thenReturn(10);
23 * //Last stubbing (e.g: thenReturn("foo")) determines the behavior of further consecutive calls.
26 * .thenReturn("foo");
29 * when(mock.someMethod()).thenReturn(1,2,3);
40 * when(mock.someMethod()).thenReturn(10);
49 OngoingStubbing<T> thenReturn(T value);
54 * when(mock.someMethod()).thenReturn(1, 2, 3);
66 OngoingStubbing<T> thenReturn(T value, T... values);
  /packages/apps/Messaging/tests/src/com/android/messaging/ui/conversation/
ConversationInputManagerTest.java 69 .thenReturn(new SimSelectorView(getTestContext(), null));
70 Mockito.when(mockConversationInputHost.createMediaPicker()).thenReturn(mockMediaPicker);
72 .thenReturn(new EditText(getTestContext()));
77 .thenReturn(null);
78 Mockito.when(mockFragmentManager.beginTransaction()).thenReturn(mockFragmentTransaction);
79 Mockito.when(mockSubscriptionListData.hasData()).thenReturn(true);
81 .thenReturn(mockSubscriptionListData);
97 Mockito.when(mockMediaPicker.isOpen()).thenReturn(true);
108 Mockito.when(mockMediaPicker.isOpen()).thenReturn(false);
120 Mockito.when(mockMediaPicker.isOpen()).thenReturn(true)
    [all...]
ComposeMessageViewTest.java 96 .thenReturn(Collections.unmodifiableList(new ArrayList<MessagePartData>()));
97 Mockito.when(mockDraftMessageData.getIsDefaultSmsApp()).thenReturn(true);
98 Mockito.when(mockIComposeMessageViewHost.isReadyForAction()).thenReturn(true);
105 .thenReturn(true);
106 Mockito.when(mockDraftMessageData.getMessageText()).thenReturn(message.getMessageText());
109 .thenReturn(message);
110 Mockito.when(mockDraftMessageData.hasPendingAttachments()).thenReturn(false);
150 .thenReturn(Collections.unmodifiableList(new ArrayList<MessagePartData>()));
151 Mockito.when(mockDraftMessageData.getIsDefaultSmsApp()).thenReturn(false);
152 Mockito.when(mockIComposeMessageViewHost.isReadyForAction()).thenReturn(false)
    [all...]
  /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
WifiStateMachineTest.java 117 when(((IInterface) tImpl).asBinder()).thenReturn(binder);
119 .thenReturn((IInterface) tImpl);
157 .thenReturn(mWifiScanner);
158 when(facade.makeBaseLogger()).thenReturn(mock(BaseWifiLogger.class));
159 when(facade.getService(Context.NETWORKMANAGEMENT_SERVICE)).thenReturn(
163 when(facade.getService(Context.WIFI_P2P_SERVICE)).thenReturn(p2pBinder);
184 when(p2pm.getP2pStateMachineMessenger()).thenReturn(new Messenger(handler));
187 when(facade.getService(BatteryStats.SERVICE_NAME)).thenReturn(batteryStatsBinder);
199 anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
217 when(pkgMgr.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT)).thenReturn(true)
    [all...]
WifiQualifiedNetworkSelectorTest.java 81 when(mClock.elapsedRealtime()).thenReturn(SystemClock.elapsedRealtime());
118 when(context.getResources()).thenReturn(mResource);
119 when(context.getSystemService(Context.NETWORK_SCORE_SERVICE)).thenReturn(mScoreManager);
126 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80);
127 when(resource.getInteger(R.integer.config_wifi_framework_RSSI_SCORE_OFFSET)).thenReturn(85);
128 when(resource.getInteger(R.integer.config_wifi_framework_SAME_BSSID_AWARD)).thenReturn(24);
130 .thenReturn(480);
132 .thenReturn(40);
133 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80);
134 when(resource.getInteger(R.integer.config_wifi_framework_RSSI_SCORE_SLOPE)).thenReturn(4)
    [all...]
WifiConnectivityManagerTest.java 80 when(mClock.elapsedRealtime()).thenReturn(SystemClock.elapsedRealtime());
115 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80);
116 when(resource.getInteger(R.integer.config_wifi_framework_SAME_BSSID_AWARD)).thenReturn(24);
124 when(context.getResources()).thenReturn(mResource);
125 when(context.getSystemService(Context.ALARM_SERVICE)).thenReturn(
186 when(stateMachine.getFrequencyBand()).thenReturn(1);
187 when(stateMachine.isLinkDebouncing()).thenReturn(false);
188 when(stateMachine.isConnected()).thenReturn(false);
189 when(stateMachine.isDisconnected()).thenReturn(true);
190 when(stateMachine.isSupplicantTransientState()).thenReturn(false)
    [all...]
  /packages/apps/Settings/tests/unit/src/com/android/settings/
UtilsTest.java 49 when(mUserManager.getUserHandle()).thenReturn(TEST_PRIMARY_USER_ID);
52 when(mUserManager.getUserInfo(TEST_PRIMARY_USER_ID)).thenReturn(primaryUser);
55 when(mUserManager.getUserInfo(eq(TEST_MANAGED_PROFILE_ID))).thenReturn(managedProfile);
65 .thenReturn(new ArrayList<UserHandle>(Arrays.asList(userHandles)));
76 .thenReturn(new ArrayList<UserHandle>(Arrays.asList(userHandles)));
  /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
ApConfigUtilTest.java 188 when(mWifiNative.isHalStarted()).thenReturn(false);
205 when(mWifiNative.isHalStarted()).thenReturn(true);
219 when(mWifiNative.isHalStarted()).thenReturn(true);
235 when(mWifiNative.isHalStarted()).thenReturn(true);
237 .thenReturn(null);
238 when(mWifiNative.isGetChannelsForBandSupported()).thenReturn(true);
252 when(mWifiNative.isHalStarted()).thenReturn(true);
254 .thenReturn(null);
255 when(mWifiNative.isGetChannelsForBandSupported()).thenReturn(false);
  /packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/network/
BlockingHttpClientTests.java 57 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_BAD_GATEWAY);
71 when(mMockHttpConnection.getResponseCode()).thenReturn(
87 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_FORBIDDEN);
88 when(mMockHttpConnection.getOutputStream()).thenReturn(mockOutputStream);
105 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK);
106 when(mMockHttpConnection.getInputStream()).thenReturn(new ByteArrayInputStream(response));
120 when(mMockHttpConnection.getOutputStream()).thenReturn(mockOutputStream);
121 when(mMockHttpConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK);
122 when(mMockHttpConnection.getInputStream()).thenReturn(new ByteArrayInputStream(response));
  /packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/task/
DisallowAddUserTaskTest.java 66 .thenReturn(false);
71 when(mockUserManager.getUsers()).thenReturn(Collections.singletonList(primaryUser));
82 when(mockUserManager.getUsers()).thenReturn(Collections.singletonList(primaryUser));
86 .thenReturn(true);
97 when(mockUserManager.getUsers()).thenReturn(Arrays.asList(new UserInfo[]{
111 when(mockUserManager.getUsers()).thenReturn(Collections.singletonList(systemUser));
  /frameworks/base/services/tests/servicestests/src/com/android/server/net/
NetworkStatsAccessTest.java 58 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTm);
59 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOps);
150 when(mTm.checkCarrierPrivilegesForPackage(TEST_PKG)).thenReturn(
157 .thenReturn(isOwner);
162 .thenReturn(isOwner);
167 .thenReturn(appOpsMode);
168 when(mContext.checkCallingPermission(Manifest.permission.PACKAGE_USAGE_STATS)).thenReturn(
175 .thenReturn(hasPermission ? PackageManager.PERMISSION_GRANTED
  /external/caliper/caliper/src/test/java/com/google/caliper/config/
CaliperConfigLoaderTest.java 62 when(optionsMock.caliperConfigFile()).thenReturn(tempConfigFile);
63 when(optionsMock.configProperties()).thenReturn(ImmutableMap.<String, String>of());
70 when(optionsMock.caliperConfigFile()).thenReturn(tempConfigFile);
71 when(optionsMock.configProperties()).thenReturn(ImmutableMap.of(
  /frameworks/volley/src/test/java/com/android/volley/
RequestQueueTest.java 53 when(req1.getTag()).thenReturn(tagA);
55 when(req2.getTag()).thenReturn(tagB);
57 when(req3.getTag()).thenReturn(tagA);
59 when(req4.getTag()).thenReturn(tagA);

Completed in 1182 milliseconds

1 2 3 4 5 6 7