Home
last modified time | relevance | path

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

123456

/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DDrawable_ConstantStateTest.java45 MockConstantState mock = spy(new MockConstantState()); in testNewDrawable() local
46 ConstantState cs = mock; in testNewDrawable()
49 verify(mock, times(1)).newDrawable(); in testNewDrawable()
50 reset(mock); in testNewDrawable()
53 verify(mock, times(1)).newDrawable(); in testNewDrawable()
54 reset(mock); in testNewDrawable()
57 verify(mock, times(1)).newDrawable(); in testNewDrawable()
58 reset(mock); in testNewDrawable()
DAnimatedStateListDrawableTest.java26 import static org.mockito.Mockito.mock;
92 Drawable unfocused = mock(Drawable.class); in testAddState()
96 Drawable focused = mock(Drawable.class); in testAddState()
106 Drawable focused = mock(Drawable.class); in testAddTransition()
107 Drawable unfocused = mock(Drawable.class); in testAddTransition()
118 MockTransition focusedToUnfocused = mock(MockTransition.class); in testAddTransition()
122 MockTransition unfocusedToFocused = mock(MockTransition.class); in testAddTransition()
126 MockTransition reversible = mock(MockTransition.class); in testAddTransition()
140 Drawable focused = mock(Drawable.class); in testOnStateChange()
141 Drawable unfocused = mock(Drawable.class); in testOnStateChange()
[all …]
/cts/tests/autofillservice/src/android/autofillservice/cts/
DImageTransformationTest.java20 import static org.mockito.Mockito.mock;
80 ValueFinder finder = mock(ValueFinder.class); in fieldCannotBeFound()
81 RemoteViews template = mock(RemoteViews.class); in fieldCannotBeFound()
99 ValueFinder finder = mock(ValueFinder.class); in theOneOptionsMatches()
100 RemoteViews template = mock(RemoteViews.class); in theOneOptionsMatches()
116 ValueFinder finder = mock(ValueFinder.class); in theOneOptionsMatchesWithContentDescription()
117 RemoteViews template = mock(RemoteViews.class); in theOneOptionsMatchesWithContentDescription()
135 ValueFinder finder = mock(ValueFinder.class); in noOptionsMatches()
136 RemoteViews template = mock(RemoteViews.class); in noOptionsMatches()
154 ValueFinder finder = mock(ValueFinder.class); in multipleOptionsOneMatches()
[all …]
DCustomDescriptionUnitTest.java19 import static org.mockito.Mockito.mock;
39 new CustomDescription.Builder(mock(RemoteViews.class));
41 new BatchUpdates.Builder().updateTemplate(mock(RemoteViews.class)).build();
42 private final Validator mValidCondition = mock(InternalValidator.class);
57 () -> mBuilder.addChild(42, mock(Transformation.class))); in testAddChild_invalidTransformation()
69 () -> mBuilder.batchUpdate(mock(Validator.class), mValidUpdate)); in testBatchUpdate_invalidCondition()
DCharSequenceTransformationTest.java22 import static org.mockito.Mockito.mock;
89 ValueFinder finder = mock(ValueFinder.class); in testBadSubst()
90 RemoteViews template = mock(RemoteViews.class); in testBadSubst()
119 ValueFinder finder = mock(ValueFinder.class); in testUnknownField()
120 RemoteViews template = mock(RemoteViews.class); in testUnknownField()
141 ValueFinder finder = mock(ValueFinder.class); in testCreditCardObfuscator()
142 RemoteViews template = mock(RemoteViews.class); in testCreditCardObfuscator()
158 ValueFinder finder = mock(ValueFinder.class); in testReplaceAllByOne()
159 RemoteViews template = mock(RemoteViews.class); in testReplaceAllByOne()
175 ValueFinder finder = mock(ValueFinder.class); in testPartialMatchIsIgnored()
[all …]
DBatchUpdatesTest.java21 import static org.mockito.Mockito.mock;
48 () -> mBuilder.transformChild(42, mock(Transformation.class))); in testAddTransformation_invalidClass()
63 assertThat(mBuilder.updateTemplate(mock(RemoteViews.class)).build()).isNotNull(); in testNoMoreChangesAfterBuild()
65 () -> mBuilder.updateTemplate(mock(RemoteViews.class))); in testNoMoreChangesAfterBuild()
67 () -> mBuilder.transformChild(42, mock(InternalTransformation.class))); in testNoMoreChangesAfterBuild()
DLuhnChecksumValidatorTest.java21 import static org.mockito.Mockito.mock;
57 ValueFinder finder = mock(ValueFinder.class); in duplicateFields()
74 ValueFinder finder = mock(ValueFinder.class); in leadingZerosAreIgnored()
89 ValueFinder finder = mock(ValueFinder.class); in onlyOneChecksumValid()
105 ValueFinder finder = mock(ValueFinder.class); in nullAutofillValuesCauseFailure()
120 ValueFinder finder = mock(ValueFinder.class); in nonDigits()
132 ValueFinder finder = mock(ValueFinder.class); in multipleFieldNumber()
DRegexValidatorTest.java21 import static org.mockito.Mockito.mock;
63 ValueFinder finder = mock(ValueFinder.class); in unknownField()
75 ValueFinder finder = mock(ValueFinder.class); in singleFieldValid()
89 ValueFinder finder = mock(ValueFinder.class); in singleFieldInvalid()
DSaveInfoTest.java19 import static org.mockito.Mockito.mock;
37 private final InternalSanitizer mSanitizer = mock(InternalSanitizer.class);
96 () -> builder.addSanitizer(mock(Sanitizer.class), mId)); in testAddSanitizer_illegalArgs()
/cts/tests/tests/view/src/android/view/cts/
DChoreographerTest.java22 import static org.mockito.Mockito.mock;
69 final Runnable addedCallback1 = mock(Runnable.class); in testPostCallbackWithoutDelay()
70 final Runnable addedCallback2 = mock(Runnable.class); in testPostCallbackWithoutDelay()
71 final Runnable removedCallback = mock(Runnable.class); in testPostCallbackWithoutDelay()
128 final Runnable addedCallback = mock(Runnable.class); in testPostCallbackWithDelay()
129 final Runnable removedCallback = mock(Runnable.class); in testPostCallbackWithDelay()
192 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay()
194 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay()
196 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithoutDelay()
241 mock(Choreographer.FrameCallback.class); in testPostFrameCallbackWithDelay()
[all …]
DViewTreeObserverTest.java23 import static org.mockito.Mockito.mock;
92 mock(ViewTreeObserver.OnGlobalFocusChangeListener.class); in testAddOnGlobalFocusChangeListener()
105 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testAddOnGlobalLayoutListener()
116 mock(ViewTreeObserver.OnPreDrawListener.class); in testAddOnPreDrawListener()
127 mock(ViewTreeObserver.OnDrawListener.class); in testAddOnDrawListener()
157 mock(ViewTreeObserver.OnTouchModeChangeListener.class); in testAddOnTouchModeChangeListener()
178 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testRemoveGlobalOnLayoutListener()
198 mock(ViewTreeObserver.OnGlobalLayoutListener.class); in testRemoveOnGlobalLayoutListener()
222 mock(ViewTreeObserver.OnGlobalFocusChangeListener.class); in testRemoveOnGlobalFocusChangeListener()
244 mock(ViewTreeObserver.OnPreDrawListener.class); in testRemoveOnPreDrawListener()
[all …]
/cts/tests/tests/transition/src/android/transition/cts/
DSceneTest.java22 import static org.mockito.Mockito.mock;
47 Runnable enterCheck = mock(Runnable.class); in testDynamicConstructor()
51 Runnable exitCheck = mock(Runnable.class); in testDynamicConstructor()
101 Runnable enterCheck = mock(Runnable.class); in constructorTest()
103 Runnable exitCheck = mock(Runnable.class); in constructorTest()
DTransitionSetTest.java23 import static org.mockito.Mockito.mock;
45 mock(Transition.TransitionListener.class); in testTransitionTogether()
49 mock(Transition.TransitionListener.class); in testTransitionTogether()
71 mock(Transition.TransitionListener.class); in testTransitionSequentially()
75 mock(Transition.TransitionListener.class); in testTransitionSequentially()
DTargetActivity.java18 import static org.mockito.Mockito.mock;
43 final TransitionListener enterListener = mock(TransitionListener.class);
44 final TransitionListener returnListener = mock(TransitionListener.class);
/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/database/src/android/database/cts/
DAbstractCursorTest.java152 MockDataSetObserver mock = new MockDataSetObserver(); in testRequery() local
153 mDatabaseCursor.registerDataSetObserver(mock); in testRequery()
154 assertFalse(mock.hadCalledOnChanged()); in testRequery()
156 assertTrue(mock.hadCalledOnChanged()); in testRequery()
160 MockContentObserver mock = new MockContentObserver(); in testOnChange() local
161 mTestAbstractCursor.registerContentObserver(mock); in testOnChange()
162 assertFalse(mock.hadCalledOnChange()); in testOnChange()
165 if ( !mock.hadCalledOnChange() ) { in testOnChange()
169 assertTrue(mock.hadCalledOnChange()); in testOnChange()
348 MockDataSetObserver mock = new MockDataSetObserver(); in testDeactivate() local
[all …]
/cts/tests/tests/widget/src/android/widget/cts/
DBaseExpandableListAdapterTest.java22 import static org.mockito.Mockito.mock;
87 DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testNotifyDataSetChanged()
98 DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testNotifyDataSetInvalidated()
123 DataSetObserver mockDataSetObserver = mock(DataSetObserver.class); in testDataSetObserver()
DRadioButtonTest.java21 import static org.mockito.Mockito.mock;
110 mock(RadioButton.OnCheckedChangeListener.class); in testAccessChecked()
143 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaApi()
164 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaEmulatedTap()
186 mock(RadioButton.OnCheckedChangeListener.class); in testToggleViaPerformClick()
DCheckBoxTest.java21 import static org.mockito.Mockito.mock;
109 mock(CheckBox.OnCheckedChangeListener.class); in testAccessChecked()
142 mock(CheckBox.OnCheckedChangeListener.class); in testToggleViaApi()
164 mock(CheckBox.OnCheckedChangeListener.class); in testToggleViaEmulatedTap()
187 mock(CheckBox.OnCheckedChangeListener.class); in testToggleViaPerformClick()
DVideoView2Test.java24 import static org.mockito.Mockito.mock;
115 mock(View.OnAttachStateChangeListener.class); in setup()
160 mock(MediaController.Callback.class); in testPlayVideo()
183 mock(VideoView2.OnViewTypeChangedListener.class); in testPlayVideoOnTextureView()
185 mock(MediaController.Callback.class); in testPlayVideoOnTextureView()
DVideoViewTest.java26 import static org.mockito.Mockito.mock;
149 mock(MediaPlayer.OnPreparedListener.class); in testPlayVideo()
153 mock(MediaPlayer.OnCompletionListener.class); in testPlayVideo()
193 mock(MediaPlayer.OnCompletionListener.class); in testAudioAttributes()
218 mock(MediaPlayer.OnErrorListener.class); in testSetOnErrorListener()
243 mock(MediaPlayer.OnPreparedListener.class); in testGetBufferPercentage()
/cts/tests/tests/content/lib/accountaccess/src/com.android.cts.content/
DSyncAdapter.java19 import static org.mockito.Mockito.mock;
34 AbstractThreadedSyncAdapter delegate = mock(AbstractThreadedSyncAdapter.class); in setNewDelegate()
/cts/hostsidetests/api/
DAndroid.mk35 test-mock/api/android-test-mock-current.txt)
/cts/tests/signature/api/
DAndroid.mk43 …eval $(call build_xml_api_file,android-test-mock-current.api,frameworks/base/test-mock/api/android…
/cts/tests/signature/api-check/android-test-mock-current-api/
DAndroid.mk22 android-test-mock-current.api \

123456