Home
last modified time | relevance | path

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

1234567

/cts/tests/autofillservice/src/android/autofillservice/cts/
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 …]
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 …]
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()
142 ValueFinder finder = mock(ValueFinder.class); in testCreditCardObfuscator()
143 RemoteViews template = mock(RemoteViews.class); in testCreditCardObfuscator()
159 ValueFinder finder = mock(ValueFinder.class); in testReplaceAllByOne()
160 RemoteViews template = mock(RemoteViews.class); in testReplaceAllByOne()
176 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/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 …]
DView_UsingViewsTest.java29 import static org.mockito.Mockito.mock;
135 View.OnClickListener cancelButtonListener = mock(View.OnClickListener.class); in testSetProperties()
275 View.OnFocusChangeListener editListener = mock(View.OnFocusChangeListener.class); in testSetFocus()
276 View.OnFocusChangeListener okListener = mock(View.OnFocusChangeListener.class); in testSetFocus()
277 View.OnFocusChangeListener cancelListener = mock(View.OnFocusChangeListener.class); in testSetFocus()
278 View.OnFocusChangeListener symbolListener = mock(View.OnFocusChangeListener.class); in testSetFocus()
279 View.OnFocusChangeListener warningListener = mock(View.OnFocusChangeListener.class); in testSetFocus()
374 View.OnClickListener cancelButtonListener = mock(View.OnClickListener.class); in testSetupListeners()
386 mock(View.OnLongClickListener.class); in testSetupListeners()
/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/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()
DMediaControllerTest.java22 import static org.mockito.Mockito.mock;
214 final View.OnClickListener mockNextClickListener = mock(View.OnClickListener.class); in testSetEnabled()
215 final View.OnClickListener mockPrevClickListener = mock(View.OnClickListener.class); in testSetEnabled()
237 final View.OnClickListener mockNextClickListener = mock(View.OnClickListener.class); in testSetPrevNextListeners()
238 final View.OnClickListener mockPrevClickListener = mock(View.OnClickListener.class); in testSetPrevNextListeners()
DArrayAdapterTest.java22 import static org.mockito.Mockito.mock;
101 final DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testDataChangeEvent()
248 final DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testInsert()
363 final DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testRemove()
436 final DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testSort()
455 final DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testAdd()
475 final DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testAddAllCollection()
503 final DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testAddAllParams()
/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/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/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/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/animation/src/android/animation/cts/
DValueAnimatorTest.java25 import static org.mockito.Mockito.mock;
151 AnimatorListener listener = mock(AnimatorListenerAdapter.class); in testListenerCallbackWithStartDelay()
232 Animator.AnimatorPauseListener l1 = mock(Animator.AnimatorPauseListener.class); in testPauseListener()
233 Animator.AnimatorPauseListener l2 = mock(Animator.AnimatorPauseListener.class); in testPauseListener()
261 final Animator.AnimatorListener listener = mock(Animator.AnimatorListener.class); in testSetCurrentPlayTimeAfterStart()
341 ValueAnimator.AnimatorUpdateListener l1 = mock(ValueAnimator.AnimatorUpdateListener.class); in testUpdateListeners()
342 ValueAnimator.AnimatorUpdateListener l2 = mock(ValueAnimator.AnimatorUpdateListener.class); in testUpdateListeners()
343 ValueAnimator.AnimatorUpdateListener l3 = mock(ValueAnimator.AnimatorUpdateListener.class); in testUpdateListeners()
344 ValueAnimator.AnimatorUpdateListener l4 = mock(ValueAnimator.AnimatorUpdateListener.class); in testUpdateListeners()
346 AnimatorListenerAdapter listener = mock(AnimatorListenerAdapter.class); in testUpdateListeners()
[all …]
DAnimatorSetTest.java25 import static org.mockito.Mockito.mock;
435 Animator.AnimatorListener listener1 = mock(AnimatorListenerAdapter.class); in testReverseWithStartDelay()
442 Animator.AnimatorListener listener = mock(AnimatorListenerAdapter.class); in testReverseWithStartDelay()
457 Animator.AnimatorListener setListener = mock(AnimatorListenerAdapter.class); in testReverseWithStartDelay()
486 Animator.AnimatorListener listener1 = mock(AnimatorListenerAdapter.class); in testZeroDurationScale()
493 Animator.AnimatorListener listener2 = mock(AnimatorListenerAdapter.class); in testZeroDurationScale()
499 Animator.AnimatorListener setListener = mock(AnimatorListenerAdapter.class); in testZeroDurationScale()
522 Animator.AnimatorListener listener1 = mock(AnimatorListenerAdapter.class); in testDurationScale()
529 Animator.AnimatorListener listener2 = mock(AnimatorListenerAdapter.class); in testDurationScale()
534 Animator.AnimatorListener setListener = mock(AnimatorListenerAdapter.class); in testDurationScale()
[all …]

1234567