/cts/common/device-side/bedstead/dpmwrapper/src/main/java/com/android/bedstead/dpmwrapper/ |
D | GenericManagerWrapper.java | 40 GenericManager mock = sMocks.get(context); in getWrapper() local 41 if (mock != null) { in getWrapper() 43 return mock; in getWrapper() 46 mock = Mockito.mock(GenericManager.class); in getWrapper() 47 String mockString = "GenericManagerWrapper#" + System.identityHashCode(mock); in getWrapper() 54 when(mock.toString()).thenReturn(mockString); in getWrapper() 55 when(mock.getSecureIntSettings(any())).thenAnswer(answer); in getWrapper() 61 sMocks.put(context, mock); in getWrapper() 64 return mock; in getWrapper()
|
/cts/tests/autofillservice/src/android/autofillservice/cts/unittests/ |
D | CustomDescriptionUnitTest.java | 21 import static org.mockito.Mockito.mock; 46 new CustomDescription.Builder(mock(RemoteViews.class)); 48 new BatchUpdates.Builder().updateTemplate(mock(RemoteViews.class)).build(); 49 private final Transformation mValidTransformation = mock(InternalTransformation.class); 50 private final Validator mValidCondition = mock(InternalValidator.class); 51 private final OnClickAction mValidAction = mock(InternalOnClickAction.class); 66 () -> mBuilder.addChild(42, mock(Transformation.class))); in testAddChild_invalidImplementation() 78 () -> mBuilder.batchUpdate(mock(Validator.class), mValidUpdate)); in testBatchUpdate_invalidImplementation() 95 () -> mBuilder.addOnClickAction(42, mock(OnClickAction.class))); in testSetOnClickAction_invalidImplementation() 101 .addOnClickAction(42, mock(InternalOnClickAction.class)) in testSetOnClickAction_thereCanBeOnlyOne() [all …]
|
D | ImageTransformationTest.java | 20 import static org.mockito.Mockito.mock; 81 ValueFinder finder = mock(ValueFinder.class); in fieldCannotBeFound() 82 RemoteViews template = mock(RemoteViews.class); in fieldCannotBeFound() 100 ValueFinder finder = mock(ValueFinder.class); in theOneOptionsMatches() 101 RemoteViews template = mock(RemoteViews.class); in theOneOptionsMatches() 117 ValueFinder finder = mock(ValueFinder.class); in theOneOptionsMatchesWithContentDescription() 118 RemoteViews template = mock(RemoteViews.class); in theOneOptionsMatchesWithContentDescription() 136 ValueFinder finder = mock(ValueFinder.class); in noOptionsMatches() 137 RemoteViews template = mock(RemoteViews.class); in noOptionsMatches() 155 ValueFinder finder = mock(ValueFinder.class); in multipleOptionsOneMatches() [all …]
|
D | CharSequenceTransformationTest.java | 22 import static org.mockito.Mockito.mock; 90 ValueFinder finder = mock(ValueFinder.class); in testBadSubst() 91 RemoteViews template = mock(RemoteViews.class); in testBadSubst() 120 ValueFinder finder = mock(ValueFinder.class); in testUnknownField() 121 RemoteViews template = mock(RemoteViews.class); in testUnknownField() 140 ValueFinder finder = mock(ValueFinder.class); in testCreditCardObfuscator() 141 RemoteViews template = mock(RemoteViews.class); in testCreditCardObfuscator() 157 ValueFinder finder = mock(ValueFinder.class); in testReplaceAllByOne() 158 RemoteViews template = mock(RemoteViews.class); in testReplaceAllByOne() 174 ValueFinder finder = mock(ValueFinder.class); in testPartialMatchIsIgnored() [all …]
|
D | BatchUpdatesTest.java | 21 import static org.mockito.Mockito.mock; 49 () -> mBuilder.transformChild(42, mock(Transformation.class))); in testAddTransformation_invalidClass() 64 assertThat(mBuilder.updateTemplate(mock(RemoteViews.class)).build()).isNotNull(); in testNoMoreChangesAfterBuild() 66 () -> mBuilder.updateTemplate(mock(RemoteViews.class))); in testNoMoreChangesAfterBuild() 68 () -> mBuilder.transformChild(42, mock(InternalTransformation.class))); in testNoMoreChangesAfterBuild()
|
D | LuhnChecksumValidatorTest.java | 21 import static org.mockito.Mockito.mock; 58 ValueFinder finder = mock(ValueFinder.class); in duplicateFields() 75 ValueFinder finder = mock(ValueFinder.class); in leadingZerosAreIgnored() 90 ValueFinder finder = mock(ValueFinder.class); in onlyOneChecksumValid() 106 ValueFinder finder = mock(ValueFinder.class); in nullAutofillValuesCauseFailure() 121 ValueFinder finder = mock(ValueFinder.class); in nonDigits() 133 ValueFinder finder = mock(ValueFinder.class); in multipleFieldNumber()
|
D | RegexValidatorTest.java | 21 import static org.mockito.Mockito.mock; 64 ValueFinder finder = mock(ValueFinder.class); in unknownField() 76 ValueFinder finder = mock(ValueFinder.class); in singleFieldValid() 90 ValueFinder finder = mock(ValueFinder.class); in singleFieldInvalid()
|
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | Drawable_ConstantStateTest.java | 46 MockConstantState mock = spy(new MockConstantState()); in testNewDrawable() local 47 ConstantState cs = mock; in testNewDrawable() 50 verify(mock, times(1)).newDrawable(); in testNewDrawable() 51 reset(mock); in testNewDrawable() 54 verify(mock, times(1)).newDrawable(); in testNewDrawable() 55 reset(mock); in testNewDrawable() 58 verify(mock, times(1)).newDrawable(); in testNewDrawable() 59 reset(mock); in testNewDrawable()
|
D | AnimatedStateListDrawableTest.java | 26 import static org.mockito.Mockito.mock; 93 Drawable unfocused = mock(Drawable.class); in testAddState() 97 Drawable focused = mock(Drawable.class); in testAddState() 107 Drawable focused = mock(Drawable.class); in testAddTransition() 108 Drawable unfocused = mock(Drawable.class); in testAddTransition() 119 MockTransition focusedToUnfocused = mock(MockTransition.class); in testAddTransition() 123 MockTransition unfocusedToFocused = mock(MockTransition.class); in testAddTransition() 127 MockTransition reversible = mock(MockTransition.class); in testAddTransition() 141 Drawable focused = mock(Drawable.class); in testOnStateChange() 142 Drawable unfocused = mock(Drawable.class); in testOnStateChange() [all …]
|
/cts/apps/CameraITS/utils/ |
D | ui_interaction_utils_tests.py | 17 import unittest.mock 31 mock_ui_object = unittest.mock.create_autospec( 40 mock_dut = unittest.mock.Mock() 41 mock_ui = unittest.mock.create_autospec(uidevice.UiDevice, instance=True) 54 self.mock_call_on_fail = unittest.mock.Mock() 57 self.addCleanup(unittest.mock.patch.stopall) 58 unittest.mock.patch.object(its_device_utils, 'run', autospec=True).start() 84 @unittest.mock.patch.object(ui_interaction_utils,
|
D | its_session_utils_tests.py | 17 import unittest.mock 54 self.addCleanup(unittest.mock.patch.stopall) 55 unittest.mock.patch.object(
|
/cts/tests/tests/car_permission_tests/src/android/car/cts/permissiontest/am/ |
D | CarActivityManagerPermissionTest.java | 22 import static org.mockito.Mockito.mock; 136 () -> mCarActivityManager.registerCarSystemUIProxy(mock(CarSystemUIProxy.class))); in registerCarSystemUIProxy_requiresPermission() 145 () -> mCarActivityManager.getCarTaskViewController(mock(Activity.class), in getCarTaskViewController_requiresPermission_INTERACT_ACROSS_USERS() 146 mock(Executor.class), mock(CarTaskViewControllerCallback.class))); in getCarTaskViewController_requiresPermission_INTERACT_ACROSS_USERS() 155 () -> mCarActivityManager.getCarTaskViewController(mock(Activity.class), in getCarTaskViewController_requiresPermission_PERMISSION_MANAGE_CAR_SYSTEM_UI() 156 mock(Executor.class), mock(CarTaskViewControllerCallback.class))); in getCarTaskViewController_requiresPermission_PERMISSION_MANAGE_CAR_SYSTEM_UI()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/ |
D | InputBindingTest.java | 22 import static org.mockito.Mockito.mock; 54 InputConnection conn = mock(InputConnection.class); in testInputBinding() 78 InputConnection conn = mock(InputConnection.class); in testInputBindingConstructor() 79 Binder connectionToken = mock(Binder.class); in testInputBindingConstructor() 91 InputConnection conn = mock(InputConnection.class); in testInputBindingCopyConstructor() 92 Binder connectionToken = mock(Binder.class); in testInputBindingCopyConstructor()
|
/cts/tests/tests/view/src/android/view/cts/ |
D | ViewTreeObserverTest.java | 23 import static org.mockito.Mockito.mock; 107 mock(ViewTreeObserver.OnGlobalFocusChangeListener.class); in testAddOnGlobalFocusChangeListener() 120 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testAddOnGlobalLayoutListener() 131 mock(ViewTreeObserver.OnPreDrawListener.class); in testAddOnPreDrawListener() 142 mock(ViewTreeObserver.OnDrawListener.class); in testAddOnDrawListener() 152 final Runnable activeListener = mock(Runnable.class); in testFrameCommitListener() 153 final Runnable removedListener = mock(Runnable.class); in testFrameCommitListener() 187 mock(ViewTreeObserver.OnTouchModeChangeListener.class); in testAddOnTouchModeChangeListener() 208 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testRemoveGlobalOnLayoutListener() 228 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testRemoveOnGlobalLayoutListener() [all …]
|
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/unittests/ |
D | HotwordDetectionServiceDefaultMethodTest.java | 19 import static org.mockito.Mockito.mock; 44 mock(AlwaysOnHotwordDetector.EventPayload.class), in testHotwordDetectionService_onDetect_fromDsp() 54 mock(ParcelFileDescriptor.class), in testHotwordDetectionService_onDetect_fromExternalSource()
|
/cts/tests/credentials/src/android/credentials/cts/unittests/selection/ |
D | ResultHelperTest.java | 25 import static org.mockito.Mockito.mock; 61 ResultReceiver resultReceiver = mock(ResultReceiver.class); in sendUiFailure() 76 ResultReceiver resultReceiver = mock(ResultReceiver.class); in sendFailure_nullMessage() 92 ResultReceiver resultReceiver = mock(ResultReceiver.class); in sendUserCancelFailure() 108 ResultReceiver resultReceiver = mock(ResultReceiver.class); in sendCancelAndLaunchSettingsFailure() 126 ResultReceiver resultReceiver = mock(ResultReceiver.class); in sendUserSelectionResult()
|
/cts/tests/tests/transition/src/android/transition/cts/ |
D | SceneTest.java | 24 import static org.mockito.Mockito.mock; 50 Runnable enterCheck = mock(Runnable.class); in testDynamicConstructor() 54 Runnable exitCheck = mock(Runnable.class); in testDynamicConstructor() 111 Runnable enterCheck = mock(Runnable.class); in constructorTest() 113 Runnable exitCheck = mock(Runnable.class); in constructorTest()
|
/cts/tests/signature/api-check/android-test-runner-current-api/ |
D | Android.bp | 32 ":cts-android-test-mock-current-api-gz", 36 // Prevent android.test.base and android.test.mock libraries from being implicitly added to 39 // android.test.mock. 42 "android.test.mock",
|
/cts/tests/tests/text/src/android/text/style/cts/ |
D | LineBackgroundSpan_StandardTest.java | 20 import static org.mockito.Mockito.mock; 66 final Canvas canvas = mock(Canvas.class); in testDrawBackground() 67 final Paint paint = mock(Paint.class); in testDrawBackground()
|
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ |
D | ShortcutManagerSpoofingTest.java | 28 import static org.mockito.Mockito.mock; 83 final LauncherApps.Callback c0_1 = mock(LauncherApps.Callback.class); in testSpoofingLauncher() 84 final LauncherApps.Callback c0_2 = mock(LauncherApps.Callback.class); in testSpoofingLauncher() 85 final LauncherApps.Callback c0_3 = mock(LauncherApps.Callback.class); in testSpoofingLauncher()
|
/cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/ |
D | TextClassificationManagerTest.java | 20 import static org.mockito.Mockito.mock; 48 final TextClassifier classifier = mock(TextClassifier.class); in testSetTextClassifier()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | BaseExpandableListAdapterTest.java | 22 import static org.mockito.Mockito.mock; 88 DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testNotifyDataSetChanged() 99 DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testNotifyDataSetInvalidated() 124 DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testDataSetObserver()
|
D | RadioButtonTest.java | 21 import static org.mockito.Mockito.mock; 122 mock(RadioButton.OnCheckedChangeListener.class); in testAccessChecked() 155 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaApi() 176 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaEmulatedTap() 199 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaPerformClick()
|
/cts/tests/surfacecontrol/src/android/view/surfacecontrol/cts/ |
D | ChoreographerTest.java | 23 import static org.mockito.Mockito.mock; 81 final Runnable addedCallback1 = mock(Runnable.class); in testPostCallbackWithoutDelay() 82 final Runnable addedCallback2 = mock(Runnable.class); in testPostCallbackWithoutDelay() 83 final Runnable removedCallback = mock(Runnable.class); in testPostCallbackWithoutDelay() 140 final Runnable addedCallback = mock(Runnable.class); in testPostCallbackWithDelay() 141 final Runnable removedCallback = mock(Runnable.class); in testPostCallbackWithDelay() 204 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay() 206 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay() 208 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay() 253 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithDelay() [all …]
|
/cts/common/device-side/util-axt/tests/src/com/android/compatibility/common/util/ |
D | RetryRuleTest.java | 22 import static org.mockito.Mockito.mock; 102 final Runnable cleaner = mock(Runnable.class); in testDoCleanOnRetryableException() 113 final Runnable cleaner = mock(Runnable.class); in testKeepLastStatusWhenFailOnRetryableException() 127 final Runnable cleaner = mock(Runnable.class); in testNeverCleanWhenStatementPass() 139 final Runnable cleaner = mock(Runnable.class); in testNeverCleanWhenDisabledAndStatementThrowsRetryableException()
|