Home
last modified time | relevance | path

Searched refs:mock (Results 1 – 25 of 33) sorted by relevance

12

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DDrawable_ConstantStateTest.java26 MockConstantState mock = new MockConstantState(); in testNewDrawable() local
27 ConstantState cs = mock; in testNewDrawable()
30 assertTrue(mock.hasCalledNewDrawable()); in testNewDrawable()
31 mock.reset(); in testNewDrawable()
34 assertTrue(mock.hasCalledNewDrawable()); in testNewDrawable()
35 mock.reset(); in testNewDrawable()
38 assertTrue(mock.hasCalledNewDrawable()); in testNewDrawable()
DAnimatedStateListDrawableTest.java43 import static org.mockito.Mockito.mock;
79 Drawable unfocused = mock(Drawable.class); in testAddState()
83 Drawable focused = mock(Drawable.class); in testAddState()
92 Drawable focused = mock(Drawable.class); in testAddTransition()
93 Drawable unfocused = mock(Drawable.class); in testAddTransition()
104 MockTransition focusedToUnfocused = mock(MockTransition.class); in testAddTransition()
108 MockTransition unfocusedToFocused = mock(MockTransition.class); in testAddTransition()
112 MockTransition reversible = mock(MockTransition.class); in testAddTransition()
124 Drawable focused = mock(Drawable.class); in testOnStateChange()
125 Drawable unfocused = mock(Drawable.class); in testOnStateChange()
[all …]
DRippleDrawableTest.java105 Drawable.Callback cb = mock(Drawable.Callback.class); in testSetColor()
DDrawableTest.java51 import static org.mockito.Mockito.mock;
560 Callback mockCallback = mock(Callback.class); in testAccessCallback()
/cts/tests/tests/database/src/android/database/cts/
DAbstractCursorTest.java153 MockDataSetObserver mock = new MockDataSetObserver(); in testRequery() local
154 mDatabaseCursor.registerDataSetObserver(mock); in testRequery()
155 assertFalse(mock.hadCalledOnChanged()); in testRequery()
157 assertTrue(mock.hadCalledOnChanged()); in testRequery()
161 MockContentObserver mock = new MockContentObserver(); in testOnChange() local
162 mTestAbstractCursor.registerContentObserver(mock); in testOnChange()
163 assertFalse(mock.hadCalledOnChange()); in testOnChange()
166 if ( !mock.hadCalledOnChange() ) { in testOnChange()
170 assertTrue(mock.hadCalledOnChange()); in testOnChange()
349 MockDataSetObserver mock = new MockDataSetObserver(); in testDeactivate() local
[all …]
/cts/common/host-side/tradefed/tests/
DAndroid.mk29 LOCAL_MODULE := compatibility-mock-tradefed
44 LOCAL_JAVA_LIBRARIES := tradefed-prebuilt compatibility-mock-tradefed junit compatibility-host-util
/cts/tests/tests/content/src/android/content/cts/
DSyncStorageEngineTest.java32 import android.test.mock.MockContentResolver;
33 import android.test.mock.MockContext;
DSearchRecentSuggestionsProviderTest.java26 import android.test.mock.MockContentResolver;
27 import android.test.mock.MockContext;
/cts/tests/tests/location/
DREADME.txt2 Note you must enable "Allow mock locations" at Settings > Developer options.
/cts/tests/tests/location2/
DREADME.txt2 "android.permission.ACCESS_FINE_LOCATION". Note you must enable "Allow mock locations"
/cts/tests/camera/src/android/hardware/camera2/cts/
DCameraManagerTest.java211 MockStateCallback mockListener = MockStateCallback.mock(); in testCameraManagerOpenCamerasSerially()
252 MockStateCallback mockListener = MockStateCallback.mock(); in testCameraManagerOpenAllCameras()
417 MockStateCallback mockSuccessListener = MockStateCallback.mock(); in testCameraManagerOpenCameraTwice()
418 MockStateCallback mockFailListener = MockStateCallback.mock(); in testCameraManagerOpenCameraTwice()
522 MockStateCallback mockListener = MockStateCallback.mock(); in testCameraManagerListenerCallbacks()
570 MockStateCallback mockListener = MockStateCallback.mock(); in testCameraManagerListenerCallbacks()
DFlashlightTest.java73 CameraManager.TorchCallback torchListener = mock(CameraManager.TorchCallback.class); in testSetTorchModeOnOff()
98 CameraManager.TorchCallback torchListener = mock(CameraManager.TorchCallback.class); in testSetTorchModeOnOff()
134 CameraManager.TorchCallback torchListener = mock(CameraManager.TorchCallback.class); in testTorchCallback()
169 mock(CameraManager.TorchCallback.class); in testCameraDeviceOpenAfterTorchOn()
DSurfaceViewPreviewTest.java222 mock(CameraCaptureSession.StateCallback.class); in preparePerformanceTestByCamera()
538 mock(CameraCaptureSession.CaptureCallback.class); in previewTestByCamera()
564 mockCaptureCallback = mock(CaptureCallback.class); in previewTestPatternTestByCamera()
620 mock(CameraCaptureSession.StateCallback.class); in surfaceSetTestByCamera()
638 mock(CameraCaptureSession.CaptureCallback.class); in surfaceSetTestByCamera()
/cts/tests/tests/print/src/android/print/cts/
DBasePrintTest.java24 import static org.mockito.Mockito.mock;
613 protected void verifyLayoutCall(InOrder inOrder, PrintDocumentAdapter mock, in verifyLayoutCall() argument
616 inOrder.verify(mock).onLayout(eq(oldAttributes), eq(newAttributes), in verifyLayoutCall()
636 PrintDocumentAdapter adapter = mock(PrintDocumentAdapter.class); in createMockPrintDocumentAdapter()
659 PrinterDiscoverySessionCallbacks callbacks = mock(PrinterDiscoverySessionCallbacks.class); in createMockPrinterDiscoverySessionCallbacks()
698 final PrintServiceCallbacks service = mock(PrintServiceCallbacks.class); in createMockPrintServiceCallbacks()
DPageRangeAdjustmentTest.java656 PrinterDiscoverySessionCallbacks mock = (PrinterDiscoverySessionCallbacks) in createMockFirstPrinterDiscoverySessionCallbacks()
659 StubbablePrinterDiscoverySession session = mock.getSession(); in createMockFirstPrinterDiscoverySessionCallbacks()
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DAppWidgetTest.java26 import static org.mockito.Mockito.mock;
767 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testUpdateAppWidgetViaComponentName()
781 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testUpdateAppWidgetViaComponentName()
860 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testUpdateAppWidgetViaWidgetId()
935 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testUpdateAppWidgetViaWidgetIds()
949 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testUpdateAppWidgetViaWidgetIds()
1030 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testPartiallyUpdateAppWidgetViaWidgetId()
1110 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testPartiallyUpdateAppWidgetViaWidgetIds()
1134 mock(MyAppWidgetHostView.OnUpdateAppWidgetListener.class); in testPartiallyUpdateAppWidgetViaWidgetIds()
1245 RemoteViewsFactory factory = mock(RemoteViewsFactory.class); in testCollectionWidgets()
[all …]
/cts/tests/app/src/android/app/cts/
DAlertDialog_BuilderTest.java62 private OnClickListener mOnClickListener = mock(OnClickListener.class);
64 private OnCancelListener mOnCancelListener = mock(OnCancelListener.class);
66 private OnDismissListener mOnDismissListener = mock(OnDismissListener.class);
68 private OnKeyListener mOnKeyListener = mock(OnKeyListener.class);
70 private OnItemSelectedListener mOnItemSelectedListener = mock(OnItemSelectedListener.class);
73 mock(OnMultiChoiceClickListener.class);
DAlertDialog_BuilderCursorTest.java63 private OnClickListener mOnClickListener = mock(OnClickListener.class);
/cts/tests/tests/widget/src/android/widget/cts/
DToolbarTest.java160 mock(Toolbar.OnMenuItemClickListener.class); in testMenuContent()
205 mock(Toolbar.OnMenuItemClickListener.class); in testMenuOverflowSubmenu()
375 View.OnClickListener mockListener = mock(View.OnClickListener.class); in testNavigationOnClickListener()
DPopupMenuTest.java359 mOnMenuItemClickListener = mock(PopupMenu.OnMenuItemClickListener.class); in configure()
365 mOnDismissListener = mock(PopupMenu.OnDismissListener.class); in configure()
DPopupWindowTest.java48 import static org.mockito.Mockito.mock;
715 OnDismissListener onDismissListener = mock(OnDismissListener.class); in testSetOnDismissListener()
771 TransitionListener enterListener = mock(TransitionListener.class); in testEnterExitTransition()
775 TransitionListener exitListener = mock(TransitionListener.class); in testEnterExitTransition()
779 OnDismissListener dismissListener = mock(OnDismissListener.class); in testEnterExitTransition()
1011 OnTouchListener onTouchListener = mock(OnTouchListener.class); in testSetTouchInterceptor()
DListPopupWindowTest.java364 View.OnClickListener mockContainerClickListener = mock(View.OnClickListener.class); in verifyDismissalViaTouch()
953 mOnItemSelectedListener = mock(AdapterView.OnItemSelectedListener.class); in configure()
959 mOnDismissListener = mock(PopupWindow.OnDismissListener.class); in configure()
/cts/tests/camera/src/android/hardware/multiprocess/camera/cts/
DCameraEvictionTest.java172 mock(CameraManager.AvailabilityCallback.class); in testBasicCamera2ActivityEviction()
280 final Camera.ErrorCallback mockErrorCb1 = mock(Camera.ErrorCallback.class); in testAPI1ActivityEviction()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityMagnificationTest.java111 final OnMagnificationChangedListener listener = mock(OnMagnificationChangedListener.class); in testListener()
/cts/tests/tests/view/src/android/view/cts/
DViewGroupOverlayTest.java253 final View.OnClickListener mockClickListener = mock(View.OnClickListener.class); in testOverlayViewNoClicks()

12