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

1 2

  /external/mockito/src/main/java/org/mockito/internal/stubbing/
BaseStubbing.java 19 public OngoingStubbing<T> thenReturn(T value) {
24 public OngoingStubbing<T> thenReturn(T value, T... values) {
25 OngoingStubbing<T> stubbing = thenReturn(value);
28 return stubbing.thenReturn(null);
31 stubbing = stubbing.thenReturn(v);
  /external/mockito/src/main/java/org/mockito/stubbing/
OngoingStubbing.java 13 * <b>when</b>(mock.someMethod()).<b>thenReturn</b>(10);
16 * when(mock.someMethod(<b>anyString()</b>)).thenReturn(10);
22 * //Last stubbing (e.g: thenReturn("foo")) determines the behavior of further consecutive calls.
25 * .thenReturn("foo");
28 * when(mock.someMethod()).thenReturn(1,2,3);
39 * when(mock.someMethod()).thenReturn(10);
48 OngoingStubbing<T> thenReturn(T value);
53 * when(mock.someMethod()).thenReturn(1, 2, 3);
67 OngoingStubbing<T> thenReturn(T value, T... values);
  /frameworks/base/core/tests/utiltests/src/com/android/internal/util/
LockPatternUtilsTest.java 59 when(context.getContentResolver()).thenReturn(cr);
63 when(ils.havePassword(DEMO_USER_ID)).thenReturn(isSecure);
65 .thenReturn((long) PASSWORD_QUALITY_MANAGED);
68 when(mLockPatternUtils.getLockSettings()).thenReturn(ils);
71 when(userInfo.isDemo()).thenReturn(isDemoUser);
73 when(um.getUserInfo(DEMO_USER_ID)).thenReturn(userInfo);
74 when(context.getSystemService(Context.USER_SERVICE)).thenReturn(um);
  /frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
LockSettingsShellCommandTest.java 88 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false);
89 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true);
90 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(false);
99 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false);
100 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true);
101 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(true);
111 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false);
112 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true);
113 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(true);
123 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(true)
    [all...]
LockSettingsStorageTests.java 77 when(mockUserManager.getProfileParent(eq(2))).thenReturn(new UserInfo(1, "name", 0));
79 when(mockUserManager.getProfileParent(eq(3))).thenReturn(new UserInfo(0, "name", 0));
369 .thenReturn(PersistentData.toBytes(PersistentData.TYPE_SP_WEAVER, SOME_USER_ID,
  /tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/
FilePullerDeviceMetricCollectorTest.java 95 .thenReturn(new File("fake"));
117 .thenReturn(new File("fake"));
156 Mockito.any(File.class))).thenReturn(true);
DumpHeapCollectorTest.java 71 .thenReturn(new String("proc,native,camera,21348,800,N/A,e\n"));
74 .thenReturn(new String("proc,native,maps,21349,900,N/A,e\n"));
77 .thenReturn(new String());
93 .thenReturn(mapsDumpheap1)
94 .thenReturn(mapsDumpheap2);
110 .thenReturn(tempFile1)
111 .thenReturn(tempFile2);
150 when(mDevice.pullFile(anyString())).thenReturn(tempFile1).thenReturn(tempFile2);
176 .thenReturn("");
    [all...]
  /frameworks/base/services/tests/servicestests/src/com/android/server/storage/
AppCollectorTest.java 72 when(mContext.getPackageManager()).thenReturn(mPm);
73 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUm);
74 when(mContext.getSystemService(Context.STORAGE_STATS_SERVICE)).thenReturn(mSsm);
88 when(mUm.getUsers()).thenReturn(mUsers);
119 eq("com.test.app"), eq(UserHandle.of(0)))).thenReturn(new StorageStats());
138 eq("com.test.app"), eq(UserHandle.of(0)))).thenReturn(new StorageStats());
140 eq("com.test.app"), eq(UserHandle.of(1)))).thenReturn(new StorageStats());
  /packages/apps/Settings/tests/robotests/src/com/android/settings/location/
LocationForWorkPreferenceControllerTest.java 75 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
81 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
83 when(mPreference.getKey()).thenReturn(key);
84 when(mPreference.isVisible()).thenReturn(true);
90 when(mPreference.isChecked()).thenReturn(true);
102 when(mPreference.isChecked()).thenReturn(false);
113 when(mUserManager.getUserProfiles()).thenReturn(new ArrayList<>());
186 when(mUserHandle.getIdentifier()).thenReturn(5);
188 when(mUserManager.getUserProfiles()).thenReturn(userProfiles);
189 when(mUserManager.getUserHandle()).thenReturn(1)
    [all...]
LocationEnablerTest.java 82 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
126 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
133 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
147 when(mUserManager.hasUserRestriction(anyString())).thenReturn(true);
158 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
171 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
182 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
198 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
208 when(mUserManager.hasUserRestriction(anyString())).thenReturn(false);
255 .thenReturn(enforcingUsers)
    [all...]
  /packages/apps/Settings/tests/robotests/src/com/android/settings/
UtilsTest.java 92 when(mContext.getSystemService(WifiManager.class)).thenReturn(wifiManager);
94 .thenReturn(connectivityManager);
99 when(wifiManager.getCurrentNetwork()).thenReturn(network);
103 when(connectivityManager.getLinkProperties(network)).thenReturn(lp);
110 when(wifiManager.getCurrentNetwork()).thenReturn(network);
112 when(connectivityManager.getLinkProperties(network)).thenReturn(null);
120 when(wifiManager.getCurrentNetwork()).thenReturn(null);
129 when(storageManager.findVolumeById(anyString())).thenReturn(info);
160 when(mDevicePolicyManager.isDeviceOwnerAppOnAnyUser(PACKAGE_NAME)).thenReturn(true);
171 when(mUserManager.getUsers()).thenReturn(userInfos)
    [all...]
  /tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
JacocoCodeCoverageTestTest.java 56 when(mockBuildInfo.getFile("jacocoant.jar")).thenReturn(new File("jacocoant.jar"));
59 .thenReturn(Arrays.asList(
  /external/javaparser/javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/resolution/
ContextTest.java 116 when(compilationUnitDecl.getName()).thenReturn("CompilationUnit");
117 when(compilationUnitDecl.getQualifiedName()).thenReturn("com.github.javaparser.ast.CompilationUnit");
119 when(typeSolver.getRoot()).thenReturn(typeSolver);
120 when(typeSolver.solveType("java.lang.Object")).thenReturn(new ReflectionClassDeclaration(Object.class, typeSolver));
121 when(typeSolver.tryToSolveType("com.github.javaparser.ast.CompilationUnit")).thenReturn(SymbolReference.solved(compilationUnitDecl));
139 when(compilationUnitDecl.getName()).thenReturn("CompilationUnit");
140 when(compilationUnitDecl.getQualifiedName()).thenReturn("com.github.javaparser.ast.CompilationUnit");
142 //when(typeSolver.tryToSolveType("java.lang.com.github.javaparser.ast.CompilationUnit")).thenReturn(SymbolReference.unsolved(ClassDeclaration.class));
143 when(typeSolver.getRoot()).thenReturn(typeSolver);
144 when(typeSolver.solveType("java.lang.Object")).thenReturn(new ReflectionClassDeclaration(Object.class, typeSolver))
    [all...]
  /frameworks/base/tests/UsbTests/src/com/android/server/usb/
UsbHandlerTest.java 144 when(mSharedPreferences.edit()).thenReturn(mEditor);
322 .thenReturn(UsbManager.USB_FUNCTION_MTP);
  /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
NetworkControllerBaseTest.java 122 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(true);
123 when(mMockCm.getDefaultNetworkCapabilitiesForUser(0)).thenReturn(
134 when(mMockProvisionController.isUserSetup(anyInt())).thenReturn(true);
158 when(mMockTm.getDataEnabled(mSubId)).thenReturn(true);
173 when(mMockSubDefaults.getDefaultDataSubId()).thenReturn(subId);
174 when(mMockSubDefaults.getDefaultVoiceSubId()).thenReturn(subId);
181 when(subscription.getSubscriptionId()).thenReturn(subId);
184 when(mMockSm.getActiveSubscriptionInfoList()).thenReturn(subs);
189 when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(false);
245 when(mServiceState.getRoaming()).thenReturn(isRoaming)
    [all...]
  /frameworks/base/services/tests/servicestests/src/com/android/server/pm/dex/
DexManagerTests.java 471 .thenReturn(mFooUser0.mPackageInfo);
  /packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/details/
WifiDetailPreferenceControllerTest.java 238 when(mockAccessPoint.getConfig()).thenReturn(mockWifiConfig);
239 when(mockAccessPoint.getLevel()).thenReturn(LEVEL);
240 when(mockAccessPoint.getSecurityString(false)).thenReturn(SECURITY);
242 .thenReturn(mockNetworkInfo);
247 .thenReturn(mockButtonsPref);
249 when(mockWifiInfo.getLinkSpeed()).thenReturn(LINK_SPEED);
250 when(mockWifiInfo.getRssi()).thenReturn(RSSI);
251 when(mockWifiInfo.getMacAddress()).thenReturn(MAC_ADDRESS);
252 when(mockWifiManager.getConnectionInfo()).thenReturn(mockWifiInfo);
254 when(mockWifiManager.getCurrentNetwork()).thenReturn(mockNetwork)
    [all...]
  /packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
CallsManagerTest.java 151 when(mInCallWakeLockControllerFactory.create(any(), any())).thenReturn(
153 when(mHeadsetMediaButtonFactory.create(any(), any(), any())).thenReturn(
155 when(mProximitySensorManagerFactory.create(any(), any())).thenReturn(
158 any())).thenReturn(mInCallController);
159 when(mClockProxy.currentTimeMillis()).thenReturn(System.currentTimeMillis());
160 when(mClockProxy.elapsedRealtime()).thenReturn(SystemClock.elapsedRealtime());
161 when(mConnSvrFocusManagerFactory.create(any(), any())).thenReturn(mConnectionSvrFocusMgr);
188 eq(SELF_MANAGED_HANDLE), any())).thenReturn(SELF_MANAGED_ACCOUNT);
190 eq(SIM_1_HANDLE), any())).thenReturn(SIM_1_ACCOUNT);
192 eq(SIM_2_HANDLE), any())).thenReturn(SIM_2_ACCOUNT)
    [all...]
  /frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
WifiStateMachineTest.java 167 when(((IInterface) tImpl).asBinder()).thenReturn(binder);
169 .thenReturn((IInterface) tImpl);
180 when(facade.getService(Context.NETWORKMANAGEMENT_SERVICE)).thenReturn(
184 when(facade.getService(Context.WIFI_P2P_SERVICE)).thenReturn(p2pBinder);
201 when(p2pm.getP2pStateMachineMessenger()).thenReturn(new Messenger(handler));
204 when(facade.getService(BatteryStats.SERVICE_NAME)).thenReturn(batteryStatsBinder);
220 when(pkgMgr.hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT)).thenReturn(true);
223 when(context.getPackageManager()).thenReturn(pkgMgr);
233 when(context.getContentResolver()).thenReturn(mockContentResolver);
235 when(context.getSystemService(Context.POWER_SERVICE)).thenReturn(
    [all...]
  /prebuilts/tools/common/m2/repository/org/mockito/mockito-core/2.2.29/
mockito-core-2.2.29.jar 
  /prebuilts/tools/common/m2/repository/org/mockito/mockito-core/2.2.5/
mockito-core-2.2.5.jar 
  /prebuilts/tools/common/m2/repository/org/mockito/mockito-core/2.7.1/
mockito-core-2.7.1.jar 
  /prebuilts/tools/common/m2/repository/org/mockito/mockito-core/2.7.6/
mockito-core-2.7.6.jar 
  /external/robolectric/v1/lib/test/
mockito-core-1.8.5.jar 
  /prebuilts/misc/common/robolectric/3.1.1/lib/
mockito-core-1.10.19.jar 

Completed in 437 milliseconds

1 2