Home
last modified time | relevance | path

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

12345678

/cts/tests/autofillservice/src/android/autofillservice/cts/unittests/
DCustomDescriptionUnitTest.java21 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 …]
DImageTransformationTest.java20 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 …]
DCharSequenceTransformationTest.java22 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 …]
DBatchUpdatesTest.java21 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()
DLuhnChecksumValidatorTest.java21 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()
DRegexValidatorTest.java21 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/
DDrawable_ConstantStateTest.java46 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()
DAnimatedStateListDrawableTest.java26 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/tests/uwb/src/android/uwb/cts/
DRangingSessionTest.java27 import static org.mockito.Mockito.mock;
62 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingOpened_OnOpenSuccessCalled()
63 IUwbAdapter adapter = mock(IUwbAdapter.class); in testOnRangingOpened_OnOpenSuccessCalled()
78 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingOpened_CannotOpenClosedSession()
79 IUwbAdapter adapter = mock(IUwbAdapter.class); in testOnRangingOpened_CannotOpenClosedSession()
102 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingClosed_OnClosedCalledWhenSessionNotOpen()
103 IUwbAdapter adapter = mock(IUwbAdapter.class); in testOnRangingClosed_OnClosedCalledWhenSessionNotOpen()
118 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingClosed_OnClosedCalled()
119 IUwbAdapter adapter = mock(IUwbAdapter.class); in testOnRangingClosed_OnClosedCalled()
133 RangingSession.Callback callback = mock(RangingSession.Callback.class); in testOnRangingResult_OnReportReceivedCalled()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DViewTreeObserverTest.java23 import static org.mockito.Mockito.mock;
94 mock(ViewTreeObserver.OnGlobalFocusChangeListener.class); in testAddOnGlobalFocusChangeListener()
107 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testAddOnGlobalLayoutListener()
118 mock(ViewTreeObserver.OnPreDrawListener.class); in testAddOnPreDrawListener()
129 mock(ViewTreeObserver.OnDrawListener.class); in testAddOnDrawListener()
139 final Runnable activeListener = mock(Runnable.class); in testFrameCommitListener()
140 final Runnable removedListener = mock(Runnable.class); in testFrameCommitListener()
174 mock(ViewTreeObserver.OnTouchModeChangeListener.class); in testAddOnTouchModeChangeListener()
195 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testRemoveGlobalOnLayoutListener()
215 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testRemoveOnGlobalLayoutListener()
[all …]
DChoreographerTest.java22 import static org.mockito.Mockito.mock;
70 final Runnable addedCallback1 = mock(Runnable.class); in testPostCallbackWithoutDelay()
71 final Runnable addedCallback2 = mock(Runnable.class); in testPostCallbackWithoutDelay()
72 final Runnable removedCallback = mock(Runnable.class); in testPostCallbackWithoutDelay()
129 final Runnable addedCallback = mock(Runnable.class); in testPostCallbackWithDelay()
130 final Runnable removedCallback = mock(Runnable.class); in testPostCallbackWithDelay()
193 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay()
195 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay()
197 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay()
242 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithDelay()
[all …]
DViewReceiveContentTest.java28 import static org.mockito.Mockito.mock;
69 mReceiver = mock(OnReceiveContentListener.class); in before()
156 DragEvent dragEvent = mock(DragEvent.class); in testOnDragEvent_noOnReceiveContentListener()
172 DragEvent dragEvent = mock(DragEvent.class); in testOnDragEvent_withOnReceiveContentListener()
197 DragEvent dragEvent = mock(DragEvent.class); in testOnDragEvent_withOnReceiveContentListener_noneOfTheContentAccepted()
217 DragEvent dragEvent = mock(DragEvent.class); in testOnDragEvent_withOnReceiveContentListener_someOfTheContentAccepted()
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DHotwordDetectionServiceDefaultMethodTest.java19 import static org.mockito.Mockito.mock;
39 mock(AlwaysOnHotwordDetector.EventPayload.class), in testHotwordDetectionService_onDetect_fromDsp()
49 mock(ParcelFileDescriptor.class), in testHotwordDetectionService_onDetect_fromExternalSource()
/cts/tests/tests/transition/src/android/transition/cts/
DSceneTest.java24 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()
DTargetActivity.java18 import static org.mockito.Mockito.mock;
47 final TransitionListener enterListener = mock(TransitionListener.class);
48 final TransitionListener returnListener = mock(TransitionListener.class);
/cts/tests/framework/base/biometrics/src/android/server/biometrics/
DBiometricSimpleTests.java24 import static org.mockito.Mockito.mock;
150 mock(BiometricPrompt.AuthenticationCallback.class); in testWhenCredentialNotEnrolled()
160 callback = mock(BiometricPrompt.AuthenticationCallback.class); in testWhenCredentialNotEnrolled()
190 mock(BiometricPrompt.AuthenticationCallback.class); in testWhenCredentialEnrolled()
198 callback = mock(BiometricPrompt.AuthenticationCallback.class); in testWhenCredentialEnrolled()
205 callback = mock(BiometricPrompt.AuthenticationCallback.class); in testWhenCredentialEnrolled()
213 callback = mock(BiometricPrompt.AuthenticationCallback.class); in testWhenCredentialEnrolled()
347 mock(BiometricPrompt.AuthenticationCallback.class); in testBiometricCancellation()
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerSpoofingTest.java28 import static org.mockito.Mockito.mock;
82 final LauncherApps.Callback c0_1 = mock(LauncherApps.Callback.class); in testSpoofingLauncher()
83 final LauncherApps.Callback c0_2 = mock(LauncherApps.Callback.class); in testSpoofingLauncher()
84 final LauncherApps.Callback c0_3 = mock(LauncherApps.Callback.class); in testSpoofingLauncher()
/cts/tests/tests/text/src/android/text/style/cts/
DLineBackgroundSpan_StandardTest.java20 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/widget/src/android/widget/cts/
DRadioButtonTest.java21 import static org.mockito.Mockito.mock;
111 mock(RadioButton.OnCheckedChangeListener.class); in testAccessChecked()
144 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaApi()
165 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaEmulatedTap()
187 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaPerformClick()
DBaseExpandableListAdapterTest.java22 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()
DCheckBoxTest.java21 import static org.mockito.Mockito.mock;
110 mock(CheckBox.OnCheckedChangeListener.class); in testAccessChecked()
143 mock(CheckBox.OnCheckedChangeListener.class); in testToggleViaApi()
165 mock(CheckBox.OnCheckedChangeListener.class); in testToggleViaEmulatedTap()
188 mock(CheckBox.OnCheckedChangeListener.class); in testToggleViaPerformClick()
DVideoViewTest.java26 import static org.mockito.Mockito.mock;
145 mock(MediaPlayer.OnPreparedListener.class); in testPlayVideo()
149 mock(MediaPlayer.OnCompletionListener.class); in testPlayVideo()
189 mock(MediaPlayer.OnCompletionListener.class); in testAudioAttributes()
214 mock(MediaPlayer.OnErrorListener.class); in testSetOnErrorListener()
238 mock(MediaPlayer.OnPreparedListener.class); in testGetBufferPercentage()
/cts/common/device-side/util-axt/tests/src/com/android/compatibility/common/util/
DRetryRuleTest.java22 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()
/cts/tests/tests/database/src/android/database/cts/
DAbstractCursorTest.java206 MockDataSetObserver mock = new MockDataSetObserver(); in testRequery() local
207 mDatabaseCursor.registerDataSetObserver(mock); in testRequery()
208 assertFalse(mock.hadCalledOnChanged()); in testRequery()
210 assertTrue(mock.hadCalledOnChanged()); in testRequery()
214 MockContentObserver mock = new MockContentObserver(); in testOnChange() local
215 mTestAbstractCursor.registerContentObserver(mock); in testOnChange()
217 mock.waitForOnChange(ON_CHANGE_TIMEOUT_MS); in testOnChange()
396 MockDataSetObserver mock = new MockDataSetObserver(); in testDeactivate() local
397 mDatabaseCursor.registerDataSetObserver(mock); in testDeactivate()
398 assertFalse(mock.hadCalledOnInvalid()); in testDeactivate()
[all …]
/cts/tests/tests/textclassifier/src/android/view/textclassifier/cts/
DTextClassificationManagerTest.java20 import static org.mockito.Mockito.mock;
48 final TextClassifier classifier = mock(TextClassifier.class); in testSetTextClassifier()

12345678