HomeSort by relevance Sort by last modified time
    Searched refs:when (Results 51 - 75 of 3740) sorted by null

1 23 4 5 6 7 8 91011>>

  /external/mockito/src/test/java/org/mockitousage/stubbing/
CallingRealMethodTest.java 39 when(mock.getValue()).thenReturn("foo");
40 when(mock.callInternalMethod()).thenCallRealMethod();
47 when(mock.getValue()).thenCallRealMethod();
54 doCallRealMethod().when(mock).setValue(anyString());
72 when(mock.getValue()).thenCallRealMethod();
73 when(mock.getValue()).thenReturn("FAKE_VALUE");
  /packages/apps/DocumentsUI/tests/common/com/android/documentsui/testing/
Views.java 30 Mockito.doCallRealMethod().when(view).setTag(Mockito.anyInt(), Mockito.any());
31 Mockito.doCallRealMethod().when(view).getTag(Mockito.anyInt());
41 Mockito.when(view.getX()).thenReturn(x);
42 Mockito.when(view.getY()).thenReturn(y);
49 Mockito.when(view.isActivated()).thenReturn(activated);
55 Mockito.when(testView.getBackground()).thenReturn(background);
  /packages/apps/Settings/tests/robotests/src/com/android/settings/
MasterClearTest.java 20 import static org.mockito.Mockito.when;
46 when(mScrollView.getChildAt(0)).thenReturn(mLinearLayout);
47 when(mScrollView.getChildCount()).thenReturn(1);
72 when(mScrollView.getHeight()).thenReturn(height);
73 when(mScrollView.getScrollY()).thenReturn(scrollY);
74 when(mLinearLayout.getBottom()).thenReturn(childBottom);
  /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
ANQPRequestManagerTest.java 27 import static org.mockito.Mockito.when;
103 * Verify that the expected set of ANQP elements are being requested when the targeted AP
111 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITHOUT_RC)).thenReturn(true);
116 * Verify that the expected set of ANQP elements are being requested when the targeted AP
124 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITH_RC)).thenReturn(true);
129 * Verify that the expected set of ANQP elements are being requested when the targeted AP
137 when(mHandler.requestANQP(TEST_BSSID, R1R2_ANQP_WITHOUT_RC)).thenReturn(true);
142 * Verify that the expected set of ANQP elements are being requested when the targeted AP
150 when(mHandler.requestANQP(TEST_BSSID, R1R2_ANQP_WITH_RC)).thenReturn(true);
155 * Verify that attempt to request ANQP elements from an AP will fail when there is a reques
    [all...]
  /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
StatusBarTest.java 37 import static org.mockito.Mockito.when;
117 when(powerManagerService.isInteractive()).thenReturn(true);
129 }).when(mStatusBarKeyguardViewManager).dismissWithAction(any(), any(), anyBoolean());
135 }).when(mStatusBarKeyguardViewManager).addAfterKeyguardGoneRunnable(any());
137 when(mStackScroller.getActivatedChild()).thenReturn(null);
151 when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
152 when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(true);
159 when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true);
160 when(mStatusBarKeyguardViewManager.isOccluded()).thenReturn(false);
167 when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(false)
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/inputmethod/
VirtualKeyboardPreferenceControllerTest.java 25 import static org.mockito.Mockito.when;
71 when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE)).thenReturn(mDpm);
72 when(mContext.getSystemService(Context.INPUT_METHOD_SERVICE)).thenReturn(mImm);
73 when(mContext.getPackageManager()).thenReturn(mPm);
91 when(mDpm.getPermittedInputMethodsForCurrentUser()).thenReturn(null);
95 when(imis.get(0).getPackageName()).thenReturn(componentName.getPackageName());
96 when(mImm.getEnabledInputMethodList()).thenReturn(imis);
97 when(imis.get(0).loadLabel(mPm)).thenReturn("label");
114 when(mDpm.getPermittedInputMethodsForCurrentUser()).thenReturn(null);
115 when(mImm.getEnabledInputMethodList()).thenReturn(imis)
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/security/
OwnerInfoPreferenceControllerTest.java 51 import static org.mockito.Mockito.when;
79 when(mFragment.isAdded()).thenReturn(true);
80 when(mFragment.getPreferenceScreen()).thenReturn(mScreen);
81 when(mFragment.getPreferenceManager().getContext()).thenReturn(mContext);
82 when(mFragment.getFragmentManager()).thenReturn(mFragmentManager);
83 when(mFragmentManager.beginTransaction()).thenReturn(mFragmentTransaction);
86 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
112 doReturn(true).when(mController).isDeviceOwnerInfoEnabled();
113 doReturn(deviceOwnerInfo).when(mController).getDeviceOwnerInfo();
124 doReturn(false).when(mController).isDeviceOwnerInfoEnabled()
    [all...]
  /packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
AutomaticStorageManagementJobServiceTest.java 55 import static org.mockito.Mockito.when;
76 when(mJobParameters.getJobId()).thenReturn(0);
82 when(mBatteryManager.isCharging()).thenReturn(true);
84 when(mVolumeInfo.getPath()).thenReturn(mFile);
85 when(mVolumeInfo.getType()).thenReturn(VolumeInfo.TYPE_PRIVATE);
86 when(mVolumeInfo.getFsUuid()).thenReturn(StorageManager.UUID_PRIMARY_PHYSICAL);
87 when(mVolumeInfo.isMountedReadable()).thenReturn(true);
89 when(mStorageVolumeProvider.getPrimaryStorageSize()).thenReturn(100L);
90 when(mStorageVolumeProvider.getVolumes()).thenReturn(mVolumes);
91 when(mStorageVolumeProvider.getFreeBytes(any(StorageStatsManager.class), eq(mVolumeInfo))
    [all...]
  /external/mockito/src/test/java/org/mockito/internal/junit/
ArgMismatchFinderTest.java 12 import static org.mockito.Mockito.when;
22 //when
32 when(mock1.simpleMethod(1)).thenReturn("1");
35 //when
45 when(mock1.simpleMethod(1)).thenReturn("1");
48 //when
58 when(mock1.simpleMethod(1)).thenReturn("1");
62 //when
72 when(mock1.simpleMethod(1)).thenReturn("1");
75 //when
    [all...]
  /packages/apps/Bluetooth/tests/src/com/android/bluetooth/btservice/
PhonePolicyTest.java 69 // Test that when new UUIDs are refreshed for a device then we set the priorities for various
83 when(mockServiceFactory.getHeadsetService()).thenReturn(mockHeadsetService);
84 when(mockHeadsetService.getPriority(device))
88 when(mockServiceFactory.getA2dpService()).thenReturn(mockA2dpService);
89 when(mockA2dpService.getPriority(device)).thenReturn(BluetoothProfile.PRIORITY_UNDEFINED);
92 when(mockAdapterService.getMainLooper()).thenReturn(mHandlerThread.getLooper());
95 when(mockAdapterService.isMock()).thenReturn(true);
119 // Test that when the adapter is turned ON then we call autoconnect on devices that have HFP and
134 when(mockAdapterService.getState()).thenReturn(BluetoothAdapter.STATE_ON);
135 when(mockAdapterService.isQuietModeEnabled()).thenReturn(false)
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/development/
BugReportPreferenceControllerTest.java 43 import static org.mockito.Mockito.when;
63 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
64 when(mScreen.findPreference(anyString())).thenReturn(mPreference);
70 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
71 when(mScreen.getPreferenceCount()).thenReturn(1);
72 when(mScreen.getPreference(0)).thenReturn(mPreference);
73 when(mPreference.getKey()).thenReturn(mController.getPreferenceKey());
82 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
91 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
101 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false)
    [all...]
  /packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
ProximitySensorManagerTest.java 34 import static org.mockito.Mockito.when;
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)
    [all...]
RingerTest.java 43 import static org.mockito.Mockito.when;
64 when(mockPlayerFactory.createPlayer(anyInt())).thenReturn(mockTonePlayer);
67 when(mockAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL);
70 when(notificationManager.matchesCallFilter(any(Bundle.class))).thenReturn(true);
75 // Start call waiting to make sure that it doesn't stop when we start ringing
77 when(mockSystemSettingsUtil.isTheaterModeOn(any(Context.class))).thenReturn(true);
87 // Start call waiting to make sure that it doesn't stop when we start ringing
89 when(mockInCallController.doesConnectedDialerSupportRinging()).thenReturn(true);
99 // Start call waiting to make sure that it doesn't stop when we start ringing
101 when(mockInCallController.doesConnectedDialerSupportRinging()).thenReturn(true)
    [all...]
  /external/volley/src/test/java/com/android/volley/toolbox/
AndroidAuthenticatorTest.java 55 when(mAccountManager.getAuthToken(mAccount, "cooltype", false, null, null)).thenReturn(mFuture);
56 when(mFuture.getResult()).thenThrow(new AuthenticatorException("sadness!"));
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)
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/network/
MobileNetworkPreferenceControllerTest.java 46 import static org.mockito.Mockito.when;
70 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
71 when(mContext.getSystemService(Context.CONNECTIVITY_SERVICE))
73 when(mContext.getSystemService(Context.TELEPHONY_SERVICE))
79 when(mUserManager.isAdminUser()).thenReturn(false);
80 when(mUserManager.hasUserRestriction(anyString(), any(UserHandle.class)))
82 when(mConnectivityManager.isNetworkSupported(ConnectivityManager.TYPE_MOBILE))
91 when(mUserManager.isAdminUser()).thenReturn(true);
92 when(mUserManager.hasUserRestriction(anyString(), any(UserHandle.class)))
94 when(mConnectivityManager.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)
    [all...]
  /external/protobuf/conformance/
conformance_ruby.rb 44 when :protobuf_payload
53 when :json_payload
61 when nil
66 when :UNSPECIFIED
69 when :PROTOBUF
72 when :JSON
75 when nil
  /frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
TelephonyTest.java 324 doReturn(mSST).when(mTelephonyComponentFactory)
327 doReturn(mIccCardProxy).when(mTelephonyComponentFactory)
330 doReturn(mCT).when(mTelephonyComponentFactory)
332 doReturn(mIccPhoneBookIntManager).when(mTelephonyComponentFactory)
334 doReturn(mDcTracker).when(mTelephonyComponentFactory)
336 doReturn(mWspTypeDecoder).when(mTelephonyComponentFactory)
338 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory)
342 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory)
346 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory)
348 doReturn(mImsCT).when(mTelephonyComponentFactory
    [all...]
CallManagerTest.java 103 doReturn(ServiceState.STATE_IN_SERVICE).when(mServiceState).getState();
104 doReturn(mBgCall).when(mPhone).getBackgroundCall();
105 doReturn(mFgCall).when(mPhone).getForegroundCall();
106 doReturn(mRingingCall).when(mPhone).getRingingCall();
107 doReturn(mPhone).when(mBgCall).getPhone();
108 doReturn(mPhone).when(mFgCall).getPhone();
109 doReturn(mPhone).when(mRingingCall).getPhone();
110 doReturn(Call.State.IDLE).when(mBgCall).getState();
111 doReturn(Call.State.IDLE).when(mFgCall).getState();
112 doReturn(Call.State.IDLE).when(mRingingCall).getState()
    [all...]
WapPushOverSmsTest.java 29 import static org.mockito.Mockito.when;
59 doReturn(mIMmsStub).when(mIMmsStub).queryLocalInterface(anyString());
72 doReturn(true).when(mWspTypeDecoder).decodeUintvarInteger(anyInt());
73 doReturn(true).when(mWspTypeDecoder).decodeContentType(anyInt());
74 doReturn((long)2).when(mWspTypeDecoder).getValue32();
75 doReturn(2).when(mWspTypeDecoder).getDecodedDataLength();
76 doReturn(WspTypeDecoder.CONTENT_TYPE_B_PUSH_CO).when(mWspTypeDecoder).getValueString();
119 when(mIMmsStub.getCarrierConfigValues(anyInt())).thenReturn(new Bundle());
123 doReturn(true).when(mWspTypeDecoder).decodeUintvarInteger(anyInt());
124 doReturn(true).when(mWspTypeDecoder).decodeContentType(anyInt())
    [all...]
  /frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/
PreferenceControllerTest.java 39 import static org.mockito.Mockito.when;
62 when(mScreen.getPreferenceCount()).thenReturn(1);
63 when(mScreen.getPreference(0)).thenReturn(mPreference);
64 when(mPreference.getKey()).thenReturn(TestPrefController.KEY_PREF);
89 when(mScreen.getPreferenceCount()).thenReturn(1);
90 when(mScreen.getPreference(0)).thenReturn(mPreference);
91 when(mPreference.getKey()).thenReturn(TestPrefController.KEY_PREF);
105 when(prefRoot.getPreferenceManager()).thenReturn(preferenceManager);
107 when(pref1.getKey()).thenReturn("key1");
109 when(prefGroup2.getPreferenceManager()).thenReturn(preferenceManager)
    [all...]
  /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/
QSSecurityFooterTest.java 20 import static org.mockito.Mockito.when;
86 when(mSecurityController.isDeviceManaged()).thenReturn(false);
95 when(mSecurityController.isDeviceManaged()).thenReturn(true);
96 when(mSecurityController.getDeviceOwnerOrganizationName()).thenReturn(null);
110 when(mSecurityController.isDeviceManaged()).thenReturn(true);
111 when(mSecurityController.getDeviceOwnerOrganizationName())
127 when(mSecurityController.isDeviceManaged()).thenReturn(true);
128 when(mSecurityController.isNetworkLoggingEnabled()).thenReturn(true);
139 when(mSecurityController.getDeviceOwnerOrganizationName())
152 when(mSecurityController.isDeviceManaged()).thenReturn(true)
    [all...]
  /frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
GsmInboundSmsHandlerTest.java 136 doReturn(true).when(mTelephonyManager).getSmsReceiveCapableForPhone(anyInt(), anyBoolean());
137 doReturn(true).when(mSmsStorageMonitor).isStorageAvailable();
140 doReturn(true).when(userManager).isUserUnlocked();
143 doReturn(new int[]{UserHandle.USER_SYSTEM}).when(mIActivityManager).getRunningUserIds();
159 doReturn(1).when(mInboundSmsTracker).getMessageCount();
160 doReturn(1).when(mInboundSmsTracker).getReferenceNumber();
161 doReturn("1234567890").when(mInboundSmsTracker).getAddress();
162 doReturn(1).when(mInboundSmsTracker).getSequenceNumber();
163 doReturn(1).when(mInboundSmsTracker).getIndexOffset();
164 doReturn(-1).when(mInboundSmsTracker).getDestPort()
    [all...]
  /external/mockito/src/test/java/org/mockitousage/internal/junit/
UnusedStubbingsFinderTest.java 15 import static org.mockito.Mockito.when;
38 //when
48 //when
49 when(mock1.simpleMethod()).thenReturn("1");
59 //when
60 when(mock1.simpleMethod()).thenReturn("1");
69 when(mock1.simpleMethod(1)).thenReturn("1");
70 when(mock2.simpleMethod(2)).thenReturn("2");
71 when(mock2.simpleMethod(3)).thenReturn("3");
75 //when
    [all...]
  /frameworks/base/core/tests/coretests/src/android/net/
NetworkKeyTest.java 5 import static org.mockito.Mockito.when;
38 when(mWifiInfo.getBSSID()).thenReturn(VALID_BSSID);
44 when(mWifiInfo.getSSID()).thenReturn("");
45 when(mWifiInfo.getBSSID()).thenReturn(VALID_BSSID);
51 when(mWifiInfo.getSSID()).thenReturn(WifiSsid.NONE);
52 when(mWifiInfo.getBSSID()).thenReturn(VALID_BSSID);
58 when(mWifiInfo.getSSID()).thenReturn(VALID_SSID);
64 when(mWifiInfo.getSSID()).thenReturn(VALID_SSID);
65 when(mWifiInfo.getBSSID()).thenReturn("");
71 when(mWifiInfo.getSSID()).thenReturn(VALID_SSID)
    [all...]
  /frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
ImageReaderTest.java 81 * Return null when there is nothing in the image queue.
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).
133 when(mReader.acquireNextImage()).thenThrow(new IllegalStateException())
    [all...]

Completed in 583 milliseconds

1 23 4 5 6 7 8 91011>>