Home
last modified time | relevance | path

Searched refs:spy (Results 1 – 25 of 53) sorted by relevance

123

/cts/common/device-side/bedstead/dpmwrapper/src/main/java/com/android/bedstead/dpmwrapper/
DDevicePolicyManagerWrapper.java45 DevicePolicyManager spy = sSpies.get(context); in getWrapper() local
46 if (spy != null) { in getWrapper()
48 return spy; in getWrapper()
51 spy = Mockito.spy(dpm); in getWrapper()
52 String spyString = "DevicePolicyManagerWrapper#" + System.identityHashCode(spy); in getWrapper()
61 doReturn(spyString).when(spy).toString(); in getWrapper()
64 doAnswer(answer).when(spy).isAdminActive(any()); in getWrapper()
65 doAnswer(answer).when(spy).isDeviceOwnerApp(any()); in getWrapper()
66 doAnswer(answer).when(spy).isManagedProfile(any()); in getWrapper()
67 doAnswer(answer).when(spy).isProfileOwnerApp(any()); in getWrapper()
[all …]
DWifiManagerWrapper.java44 WifiManager spy = sSpies.get(context); in getWrapper() local
45 if (spy != null) { in getWrapper()
47 return spy; in getWrapper()
50 spy = Mockito.spy(manager); in getWrapper()
51 String spyString = "WifiManagerWrapper#" + System.identityHashCode(spy); in getWrapper()
59 doReturn(spyString).when(spy).toString(); in getWrapper()
62 doAnswer(answer).when(spy).addNetwork(any()); in getWrapper()
63 doAnswer(answer).when(spy).enableNetwork(anyInt(), anyBoolean()); in getWrapper()
64 doAnswer(answer).when(spy).removeNetwork(anyInt()); in getWrapper()
65 doAnswer(answer).when(spy).getConfiguredNetworks(); in getWrapper()
[all …]
DHardwarePropertiesManagerWrapper.java44 HardwarePropertiesManager spy = sSpies.get(context); in getWrapper() local
45 if (spy != null) { in getWrapper()
47 return spy; in getWrapper()
50 spy = Mockito.spy(manager); in getWrapper()
51 String spyString = "HardwarePropertiesManagerWrapper#" + System.identityHashCode(spy); in getWrapper()
59 doReturn(spyString).when(spy).toString(); in getWrapper()
62 doAnswer(answer).when(spy).getCpuUsages(); in getWrapper()
63 doAnswer(answer).when(spy).getDeviceTemperatures(anyInt(), anyInt()); in getWrapper()
64 doAnswer(answer).when(spy).getFanSpeeds(); in getWrapper()
70 sSpies.put(context, spy); in getWrapper()
[all …]
DUserManagerWrapper.java42 UserManager spy = sSpies.get(context); in getWrapper() local
43 if (spy != null) { in getWrapper()
45 return spy; in getWrapper()
48 spy = Mockito.spy(manager); in getWrapper()
49 String spyString = "UserManagerWrapper#" + System.identityHashCode(spy); in getWrapper()
57 doReturn(spyString).when(spy).toString(); in getWrapper()
60 doAnswer(answer).when(spy).getApplicationRestrictions(any()); in getWrapper()
66 sSpies.put(context, spy); in getWrapper()
69 return spy; in getWrapper()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DDrawableContainerStateTest.java27 import static org.mockito.Mockito.spy;
70 Drawable dr0 = spy(new ColorDrawable(Color.RED)); in testAddChild()
82 Drawable dr1 = spy(new ColorDrawable(Color.BLUE)); in testAddChild()
110 Drawable dr0 = spy(new ColorDrawable(Color.RED)); in testIsStateful()
116 Drawable dr1 = spy(new ColorDrawable(Color.GREEN)); in testIsStateful()
122 Drawable dr2 = spy(new ColorDrawable(Color.BLUE)); in testIsStateful()
128 Drawable dr3 = spy(new ColorDrawable(Color.YELLOW)); in testIsStateful()
203 Drawable dr0 = spy(new ColorDrawable(Color.RED)); in testConstantHeightsAndWidths()
215 Drawable dr1 = spy(new ColorDrawable(Color.BLUE)); in testConstantHeightsAndWidths()
227 Drawable dr2 = spy(new ColorDrawable(Color.GREEN)); in testConstantHeightsAndWidths()
[all …]
DDrawableContainerTest.java36 import static org.mockito.Mockito.spy;
106 Drawable dr = spy(new ColorDrawable(Color.WHITE)); in testDraw()
182 Drawable dr0 = spy(new ColorDrawable(Color.BLUE)); in testGetPadding()
189 Drawable dr1 = spy(new ColorDrawable(Color.RED)); in testGetPadding()
231 Drawable mockDrawable = spy(new ColorDrawable(Color.BLACK)); in testSetAlpha()
251 Drawable dr = spy(new ColorDrawable(Color.BLUE)); in testSetDither()
309 Drawable mockDrawable = spy(new ColorDrawable(Color.MAGENTA)); in testSetColorFilter()
329 Drawable dr = spy(new ColorDrawable(Color.GREEN)); in testSetTint()
341 Drawable dr = spy(new ColorDrawable(Color.GREEN)); in testSetBlendMode()
385 Drawable dr0 = spy(new ColorDrawable(Color.YELLOW)); in testIsStateful()
[all …]
DDrawableWrapperTest.java31 import static org.mockito.Mockito.spy;
168 Drawable mockDrawable = spy(new ColorDrawable(Color.BLUE)); in testDraw()
201 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testGetPadding()
229 Drawable mockDrawable = spy(new ColorDrawable(Color.YELLOW)); in testSetVisible()
251 Drawable mockDrawable = spy(new ColorDrawable(Color.MAGENTA)); in testSetAlpha()
269 Drawable mockDrawable = spy(new ColorDrawable(Color.GRAY)); in testSetColorFilter()
283 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testGetOpacity()
294 Drawable mockDrawable = spy(new ColorDrawable(Color.BLACK)); in testIsStateful()
374 Drawable mockDrawable = spy(new ColorDrawable(Color.WHITE)); in testGetIntrinsicWidth()
384 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testGetIntrinsicHeight()
DDrawable_ConstantStateTest.java22 import static org.mockito.Mockito.spy;
46 MockConstantState mock = spy(new MockConstantState()); in testNewDrawable()
DScaleDrawableTest.java34 import static org.mockito.Mockito.spy;
152 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testDraw()
190 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testGetPadding()
208 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testSetVisible()
229 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testSetAlpha()
247 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testSetColorFilter()
261 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testGetOpacity()
272 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testIsStateful()
402 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testGetIntrinsicWidth()
412 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testGetIntrinsicHeight()
DLayerDrawableTest.java37 import static org.mockito.Mockito.spy;
308 Drawable firstLayer = spy(new ColorDrawable(Color.YELLOW)); in testSetLayerInset()
311 Drawable secondLayer = spy(new ColorDrawable(Color.YELLOW)); in testSetLayerInset()
406 Drawable mockDrawable1 = spy(new ColorDrawable(Color.BLUE)); in testDraw()
407 Drawable mockDrawable2 = spy(new ColorDrawable(Color.RED)); in testDraw()
514 Drawable mockDrawable1 = spy(new ColorDrawable(Color.BLUE)); in testSetDither()
515 Drawable mockDrawable2 = spy(new ColorDrawable(Color.BLACK)); in testSetDither()
560 Drawable mockDrawable1 = spy(new ColorDrawable(Color.BLUE)); in testSetAlpha()
561 Drawable mockDrawable2 = spy(new ColorDrawable(Color.BLACK)); in testSetAlpha()
578 Drawable mockDrawable1 = spy(new ColorDrawable(Color.BLUE)); in testSetColorFilter()
[all …]
DClipDrawableTest.java30 import static org.mockito.Mockito.spy;
80 Drawable mockDrawable = spy(new ColorDrawable(Color.GREEN)); in testDraw()
118 Drawable mockDrawable = spy(new ColorDrawable(Color.GREEN)); in testGetConstantState()
164 Drawable dr = spy(new ColorDrawable(Color.GREEN)); in testGetOpacity()
338 Drawable mockDrawable = spy(new ColorDrawable(Color.GREEN)); in testSetColorFilter()
/cts/tests/tests/widget/src/android/widget/cts/
DSearchView_CursorTest.java23 import static org.mockito.Mockito.spy;
177 spy(new MyQueryTextListener()); in testSuggestionFiltering()
197 spy(new MySuggestionListener()); in testSuggestionSelection()
201 spy(new MyQueryTextListener()); in testSuggestionSelection()
243 spy(new MySuggestionListener()); in testSuggestionEnterKey()
247 spy(new MyQueryTextListener()); in testSuggestionEnterKey()
DProgressBarTest.java29 import static org.mockito.Mockito.spy;
197 Drawable mockProgressDrawable = spy(new ColorDrawable(Color.YELLOW)); in testAccessIndeterminateDrawable()
214 Drawable mockProgressDrawable = spy(new ColorDrawable(Color.BLUE)); in testAccessProgressDrawable()
391 ProgressBar mockProgressBar = spy(new ProgressBar(mActivity)); in testInvalidateDrawable()
393 Drawable mockDrawable1 = spy(new ColorDrawable(Color.RED)); in testInvalidateDrawable()
394 Drawable mockDrawable2 = spy(new ColorDrawable(Color.GREEN)); in testInvalidateDrawable()
462 Drawable mockProgressDrawable = spy(new ColorDrawable(Color.BLACK)); in testProgressTint()
516 Drawable mockProgressDrawable = spy(new ColorDrawable(Color.BLACK)); in testProgressTintBlendMode()
561 Drawable mockIndeterminateDrawable = spy(new ColorDrawable(Color.MAGENTA)); in testIndeterminateTint()
596 Drawable mockIndeterminateDrawable = spy(new ColorDrawable(Color.MAGENTA)); in testIndeterminateTintBlendMode()
DAbsSeekBarTest.java25 import static org.mockito.Mockito.spy;
159 Drawable mockProgressDrawable = spy(new ColorDrawable(Color.YELLOW)); in testDrawableStateChanged()
316 Drawable mockThumb = spy(new ColorDrawable(Color.BLUE)); in testThumbTint()
347 Drawable mockThumb = spy(new ColorDrawable(Color.BLUE)); in testThumbTintBlendMode()
379 Drawable mockTickMark = spy(new ColorDrawable(Color.BLUE)); in testTickMarkTint()
411 Drawable mockTickMark = spy(new ColorDrawable(Color.BLUE)); in testTickMarkTintBlendMode()
/cts/tests/tests/text/src/android/text/cts/
DLoginFilterTest.java26 import static org.mockito.Mockito.spy;
48 LoginFilter loginFilter = spy(new UsernameFilterGeneric()); in testFilter()
70 loginFilter = spy(new UsernameFilterGeneric(true)); in testFilter()
84 loginFilter = spy(new UsernameFilterGeneric(false)); in testFilter()
/cts/tests/tests/transition/src/android/transition/cts/
DTargetActivity.java50 public static List<TargetActivity> sCreated = Mockito.spy(new ArrayList<>());
59 sCreated = Mockito.spy(new ArrayList<>()); in clearCreated()
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerConfigActivityTest.java21 import static org.mockito.Mockito.spy;
71 LauncherActivityInfo lai = spy(originalLai); in testIntentSenderNotCreatedForWrongActivity()
/cts/tests/tests/view/src/android/view/cts/
DActionModeTest.java30 import static org.mockito.Mockito.spy;
80 final ActionMode mockActionMode = spy(new MockActionMode()); in testInvalidateContentRectDoesNotInvalidateFull()
/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
DCameraSessionUtils.java144 return spy(new CaptureCallback()); in getMockCaptureListener()
151 return spy(new SessionListener()); in getMockSessionListener()
/cts/common/device-side/bedstead/dpmwrapper/
DAndroid.bp17 // Mockito spy to implement the IPC between users (so tests running on current user can call the
/cts/tests/tests/text/src/android/text/method/cts/
DPasswordTransformationMethodTest.java28 import static org.mockito.Mockito.spy;
93 mMethod = spy(new PasswordTransformationMethod()); in setup()
DTextKeyListenerTest.java30 import static org.mockito.Mockito.spy;
103 final TextKeyListener mockTextKeyListener = spy( in testOnSpanAdded()
DMultiTapKeyListenerTest.java28 import static org.mockito.Mockito.spy;
81 = spy(new MultiTapKeyListener(Capitalize.CHARACTERS, true)); in testOnSpanAdded()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DWindowInsetsAnimationTestBase.java36 import static org.mockito.Mockito.spy;
303 spy(new AnimCallback(WindowInsetsAnimation.Callback.DISPATCH_MODE_STOP));
328 mListener = spy(new InsetsListener()); in onCreate()
/cts/tests/tests/content/src/android/content/cts/
DContentProviderClientTest.java23 import static org.mockito.Mockito.spy;
103 mContentResolver = spy(new MockContentResolver(attributionContext)); in setUp()
104 mContentProviderClient = spy(new ContentProviderClient(mContentResolver, mIContentProvider, in setUp()

123