Home
last modified time | relevance | path

Searched refs:verify (Results 1 – 25 of 47) sorted by relevance

12

/platform_testing/libraries/device-collectors/src/test/java/android/device/collectors/
DBaseCollectionListenerTest.java36 import static org.mockito.Mockito.verify;
81 verify(helper, times(1)).startCollecting(); in testPerRunFlow()
83 verify(helper, times(1)).startCollecting(); in testPerRunFlow()
85 verify(helper, times(0)).stopCollecting(); in testPerRunFlow()
87 verify(helper, times(1)).stopCollecting(); in testPerRunFlow()
102 verify(helper, times(0)).startCollecting(); in testPerTestFlow()
104 verify(helper, times(1)).startCollecting(); in testPerTestFlow()
106 verify(helper, times(1)).getMetrics(); in testPerTestFlow()
107 verify(helper, times(1)).stopCollecting(); in testPerTestFlow()
109 verify(helper, times(2)).startCollecting(); in testPerTestFlow()
[all …]
DBatteryStatsListenerTest.java42 import static org.mockito.Mockito.verify;
100 verify(mListener).createAndEmptyDirectory(BatteryStatsListener.DEFAULT_DIR); in testTestRunCollector()
101 verify(mListener, times(1)).resetBatteryStats(); in testTestRunCollector()
105 verify(mListener, times(1)).resetBatteryStats(); in testTestRunCollector()
109 verify(mListener, times(1)).resetBatteryStats(); in testTestRunCollector()
110 verify(mListener, times(0)).dumpBatteryStats(anyString()); in testTestRunCollector()
114 verify(mListener, times(1)).resetBatteryStats(); in testTestRunCollector()
115 verify(mListener, times(1)).dumpBatteryStats(anyString()); in testTestRunCollector()
136 verify(mListener).createAndEmptyDirectory("unique/bs/dir"); in testTestRunSaveToSpecifiedDirCollector()
148 verify(mListener, times(0)).createAndEmptyDirectory(BatteryStatsListener.DEFAULT_DIR); in testTestRunToBytesCollector()
[all …]
DPerfettoListenerTest.java30 import static org.mockito.Mockito.verify;
130 verify(mPerfettoHelper, times(1)).startCollecting(anyString(), anyBoolean()); in testPerfettoPerTestSuccessFlow()
132 verify(mPerfettoHelper, times(1)).stopCollecting(anyLong(), anyString()); in testPerfettoPerTestSuccessFlow()
153 verify(mPerfettoHelper, times(1)).startCollecting(anyString(), anyBoolean()); in testPerfettoPerTestFailureFlowDefault()
160 verify(mPerfettoHelper, times(1)).stopCollecting(anyLong(), anyString()); in testPerfettoPerTestFailureFlowDefault()
181 verify(mPerfettoHelper, times(1)).startCollecting(anyString(), anyBoolean()); in testPerfettoPerTestFailureFlowWithSkipMmetrics()
188 verify(mPerfettoHelper, times(1)).stopPerfetto(); in testPerfettoPerTestFailureFlowWithSkipMmetrics()
208 verify(mPerfettoHelper, times(1)).startCollecting(anyString(), anyBoolean()); in testPerfettoDefaultStartWaitTime()
210 verify(mPerfettoHelper, times(1)).stopCollecting(anyLong(), anyString()); in testPerfettoDefaultStartWaitTime()
234 verify(mPerfettoHelper, times(1)).startCollecting(anyString(), anyBoolean()); in testPerfettoCustomStartWaitTime()
[all …]
DSimpleperfListenerTest.java23 import static org.mockito.Mockito.verify;
98 verify(mSimpleperfHelper, times(1)).startCollecting(anyString(), anyString()); in testSimpleperfPerTestSuccessFlow()
100 verify(mSimpleperfHelper, times(1)).stopCollecting(anyString()); in testSimpleperfPerTestSuccessFlow()
120 verify(mSimpleperfHelper, times(1)).startCollecting(anyString(), anyString()); in testSimpleperfPerTestFailureFlowDefault()
126 verify(mSimpleperfHelper, times(1)).stopCollecting(anyString()); in testSimpleperfPerTestFailureFlowDefault()
146 verify(mSimpleperfHelper, times(1)).startCollecting(anyString(), anyString()); in testSimpleperfPerTestFailureFlowWithSkipMmetrics()
152 verify(mSimpleperfHelper, times(1)).stopSimpleperf(); in testSimpleperfPerTestFailureFlowWithSkipMmetrics()
169 verify(mSimpleperfHelper, times(1)).startCollecting(anyString(), anyString()); in testSimpleperfPerRunSuccessFlow()
171 verify(mSimpleperfHelper, times(1)).startCollecting(anyString(), anyString()); in testSimpleperfPerRunSuccessFlow()
173 verify(mSimpleperfHelper, times(0)).stopCollecting(anyString()); in testSimpleperfPerRunSuccessFlow()
[all …]
DTotalPssMetricListenerTest.java26 import static org.mockito.Mockito.verify;
79 verify(mTotalPssMetricHelper).setUp("process1", "process2"); in testHelperReceivesProcessNames()
94 verify(mTotalPssMetricHelper).setUp("process1"); in testAdditionalPssOptions()
95 verify(mTotalPssMetricHelper).setMinIterations(50); in testAdditionalPssOptions()
96 verify(mTotalPssMetricHelper).setMaxIterations(102); in testAdditionalPssOptions()
97 verify(mTotalPssMetricHelper).setSleepTime(2000); in testAdditionalPssOptions()
98 verify(mTotalPssMetricHelper).setThreshold(2048); in testAdditionalPssOptions()
DScreenshotOnFailureCollectorTest.java29 import static org.mockito.Mockito.verify;
114 verify(mListener).createAndEmptyDirectory(ScreenshotOnFailureCollector.DEFAULT_DIR); in testSavePngAsFile()
123 verify(mListener, times(i)).takeScreenshot(any()); in testSavePngAsFile()
133 Mockito.verify(mInstrumentation, times(NUM_TEST_CASE)) in testSavePngAsFile()
156 verify(mListener).createAndEmptyDirectory(ScreenshotOnFailureCollector.DEFAULT_DIR); in testSaveUixAsFile()
162 verify(mListener, times(i)).collectUiXml(any()); in testSaveUixAsFile()
169 Mockito.verify(mInstrumentation, times(NUM_TEST_CASE)) in testSaveUixAsFile()
194 verify(mListener).createAndEmptyDirectory(ScreenshotOnFailureCollector.DEFAULT_DIR); in testNoUixWithoutOption()
201 verify(mListener, Mockito.never()).collectUiXml(any()); in testNoUixWithoutOption()
206 Mockito.verify(mInstrumentation, times(NUM_TEST_CASE)) in testNoUixWithoutOption()
[all …]
DScreenRecordCollectorTest.java28 import static org.mockito.Mockito.verify;
109 verify(mListener).createAndEmptyDirectory(ScreenRecordCollector.OUTPUT_DIR); in testScreenRecord()
117 verify(mDevice, times(i)).executeShellCommand(matches("screenrecord .*video.mp4")); in testScreenRecord()
119 verify(mDevice, times(i)) in testScreenRecord()
131 verify(mDevice, times(i)).executeShellCommand(eq("pidof screenrecord")); in testScreenRecord()
132 verify(mDevice, times(i)).executeShellCommand(matches("kill -2 1234")); in testScreenRecord()
142 Mockito.verify(mInstrumentation, times(NUM_TEST_CASE)) in testScreenRecord()
178 .verify(mDevice, times(ScreenRecordCollector.MAX_RECORDING_PARTS)) in testScreenRecord_multipleTests()
183 .verify(mDevice) in testScreenRecord_multipleTests()
188 .verify(mDevice) in testScreenRecord_multipleTests()
DShowmapSnapshotListenerTest.java24 import static org.mockito.Mockito.verify;
76 verify(mShowmapSnapshotHelper).setUp(VALID_OUTPUT_DIR, "process1", "process2"); in testHelperReceivesProcessNames()
90 verify(mShowmapSnapshotHelper).setUp(VALID_OUTPUT_DIR, "process1"); in testAdditionalOptions()
91 verify(mShowmapSnapshotHelper).setMetricNameIndex(SAMPLE_METRIC_INDEX); in testAdditionalOptions()
93 verify(mShowmapSnapshotHelper).setDropCacheOption(3); in testAdditionalOptions()
DProcLoadListenerTest.java24 import static org.mockito.Mockito.verify;
78 verify(mProcLoadHelper).setProcLoadThreshold(1); in testLoadProcAdditionalOptions()
79 verify(mProcLoadHelper).setProcLoadWaitTimeInMs(3L); in testLoadProcAdditionalOptions()
80 verify(mProcLoadHelper).setProcLoadIntervalInMs(2L); in testLoadProcAdditionalOptions()
DBinderListenerTest.java20 import static org.mockito.Mockito.verify;
66 verify(mHelper).addTrackedProcesses("com.android.systemui"); in testCollect_singleSpecificProcess()
84 verify(mHelper).addTrackedProcesses("com.android.systemui", "system"); in testCollect_multiSpecificProcess()
98 verify(mHelper, never()).addTrackedProcesses(anyString()); in testCollect_noSpecificProcess()
DDumpsysServiceListenerTest.java21 import static org.mockito.Mockito.verify;
60 verify(mDumpsysServiceHelper, never()).setUp(any()); in testListener_noProcessNames()
71 verify(mDumpsysServiceHelper).setUp("service1", "service2"); in testListener_withProcessNames()
/platform_testing/libraries/collectors-helper/memory/test/src/com/android/helpers/tests/
DGarbageCollectionHelperTest.java83 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testOneAppToGc()
84 inOrder.verify(mUiDevice).executeShellCommand("kill -10 1"); in testOneAppToGc()
96 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testMultipleAppsToGc()
97 inOrder.verify(mUiDevice).executeShellCommand("kill -10 1"); in testMultipleAppsToGc()
98 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name2"); in testMultipleAppsToGc()
99 inOrder.verify(mUiDevice).executeShellCommand("kill -10 2"); in testMultipleAppsToGc()
100 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name3"); in testMultipleAppsToGc()
101 inOrder.verify(mUiDevice).executeShellCommand("kill -10 3"); in testMultipleAppsToGc()
113 inOrder.verify(mUiDevice).executeShellCommand("pidof does.not.exist"); in testSkipsGcOnDneApp()
114 inOrder.verify(mUiDevice).executeShellCommand("pidof package.name1"); in testSkipsGcOnDneApp()
[all …]
/platform_testing/libraries/health/rules/tests/src/android/platform/test/rule/
DUnlockScreenRuleTest.java19 import static org.mockito.Mockito.verify;
46 verify(rule.getUiDevice(), times(1)).wakeUp(); in testScreenOff()
47 verify(rule.getUiDevice(), times(1)).pressMenu(); in testScreenOff()
62 verify(rule.getUiDevice(), times(0)).wakeUp(); in testScreenLocked()
63 verify(rule.getUiDevice(), times(1)).pressMenu(); in testScreenLocked()
78 verify(rule.getUiDevice(), times(0)).wakeUp(); in testScreenOn()
79 verify(rule.getUiDevice(), times(0)).pressMenu(); in testScreenOn()
DNotificationPressureRuleTest.java19 import static org.mockito.Mockito.verify;
49 verify(rule.initNotificationHelper()) in testPostNotifications_withoutPackage()
58 verify(rule.initNotificationHelper()).cancelNotifications(); in testPostNotifications_withoutPackage()
74 verify(rule.initNotificationHelper()) in testPostNotifications_withPackage()
82 verify(rule.initNotificationHelper()).cancelNotifications(); in testPostNotifications_withPackage()
DNaturalOrientationRuleTest.java20 import static org.mockito.Mockito.verify;
46 verify(rule.getUiDevice(), times(1)).setOrientationNatural(); in testNaturalOrientationSetAndUnset()
47 verify(rule.getUiDevice(), never()).unfreezeRotation(); in testNaturalOrientationSetAndUnset()
52 verify(rule.getUiDevice(), times(1)).unfreezeRotation(); in testNaturalOrientationSetAndUnset()
DPressHomeRuleTest.java20 import static org.mockito.Mockito.verify;
52 verify(rule.getUiDevice(), never()).pressHome(); in testPressHomeEnabled()
57 verify(rule.getUiDevice(), times(1)).pressHome(); in testPressHomeEnabled()
74 verify(rule.getUiDevice(), never()).pressHome(); in testPressHomeDisabled()
79 verify(rule.getUiDevice(), times(0)).pressHome(); in testPressHomeDisabled()
DGarbageCollectRuleTest.java20 import static org.mockito.Mockito.verify;
61 verify(mGcHelper).setUp("package.name1"); in testCallsGcBeforeTest()
62 verify(mGcHelper).garbageCollect(); in testCallsGcBeforeTest()
/platform_testing/libraries/device-collectors/src/test/platform/android/device/collectors/
DStatsdListenerTest.java30 import static org.mockito.Mockito.verify;
141 verify(mListener, times(1)).addStatsConfig(eq(CONFIG_ID_1), eq(serialize(CONFIG_1))); in testRunLevelCollection_statsdInteraction()
142 verify(mListener, times(1)).addStatsConfig(eq(CONFIG_ID_2), eq(serialize(CONFIG_2))); in testRunLevelCollection_statsdInteraction()
143 verify(mListener, times(1)).logStart(eq(StatsdListener.RUN_EVENT_LABEL)); in testRunLevelCollection_statsdInteraction()
146 verify(mListener, times(1)).logStop(eq(StatsdListener.RUN_EVENT_LABEL)); in testRunLevelCollection_statsdInteraction()
147 verify(mListener, times(1)).getStatsReports(eq(CONFIG_ID_1)); in testRunLevelCollection_statsdInteraction()
148 verify(mListener, times(1)).getStatsReports(eq(CONFIG_ID_2)); in testRunLevelCollection_statsdInteraction()
149 verify(mListener, times(1)).removeStatsConfig(eq(CONFIG_ID_1)); in testRunLevelCollection_statsdInteraction()
150 verify(mListener, times(1)).removeStatsConfig(eq(CONFIG_ID_2)); in testRunLevelCollection_statsdInteraction()
167 verify(mListener, times(1)) in testRunLevelCollection_metrics()
[all …]
/platform_testing/libraries/audio-test-harness/server/src/test/java/com/android/media/audiotestharness/server/service/
DAudioCaptureSessionTests.java24 import static org.mockito.Mockito.verify;
73 verify(mAudioCapturer).attachOutput(mCaptureChunkStreamObserverOutputStream); in create_attachesOutputStreamToAudioCapturer()
92 verify(mAudioCapturer).open(); in start_opensAudioCapturer()
116 verify(mAudioCapturer).close(); in stop_closesAudioCapturer()
127 verify(mCaptureChunkStreamObserverOutputStream).close(); in stop_closesCaptureChunkOutputStream()
151 verify(mCaptureChunkStreamObserverOutputStream).awaitClose(1234, TimeUnit.SECONDS); in awaitStop_waitsOnCaptureChunkStreamObserverToClose()
164 verify(mAudioCapturer).close(); in awaitStop_closesAudioCapturerWhenTimeoutReached()
177 verify(mCaptureChunkStreamObserverOutputStream).close(); in awaitStop_closesCaptureChunkOutputStreamWhenTimeoutReached()
/platform_testing/libraries/health/runners/longevity/platform/tests/src/android/platform/test/longevity/
DScheduledScenarioRunnerTest.java26 import static org.mockito.Mockito.verify;
106 verify(mRunNotifier, atLeastOnce()).fireTestFailure(failureCaptor.capture()); in testOverTimeTest_throwsTestTimedOutException()
149 verify(runner, never()).performIdleBeforeTeardown(anyLong()); in testOverTimeTest_doesNotIdleBeforeTeardown()
173 verify(runner, times(1)) in testOverTimeTest_idlesAfterTeardownUntilNextScenario()
201 verify(runner, times(1)) in testRespectsAfterTestPolicy_stayInApp()
206 verify(mRunNotifier, never()).fireTestFailure(any(Failure.class)); in testRespectsAfterTestPolicy_stayInApp()
230 verify(runner, never()).performIdleBeforeTeardown(anyLong()); in testRespectsAfterTestPolicy_exit()
232 verify(runner, times(1)) in testRespectsAfterTestPolicy_exit()
235 verify(mRunNotifier, never()).fireTestFailure(any(Failure.class)); in testRespectsAfterTestPolicy_exit()
265 verify(runner, never()).performIdleBeforeTeardown(anyLong()); in testIgnoredScenario_doesIdle()
[all …]
DLongevityClassRunnerTest.java28 import static org.mockito.Mockito.verify;
160 verify(mRunner, times(1)).withBeforeClasses(any(Statement.class)); in testBeforeClassMethodsAddedAsBeforeMethods()
161 verify(mRunner, times(1)) in testBeforeClassMethodsAddedAsBeforeMethods()
225 verify(mRunner, times(1)).withAfterClasses(any(Statement.class)); in testAfterClassMethodsAddedAsAfterMethods()
226 verify(mRunner, times(1)) in testAfterClassMethodsAddedAsAfterMethods()
307 verify(mRunner, times(1)).invokeAndCollectErrors(methodsCaptor.capture(), any()); in testAfterClass_runAsAfterForPassingTest()
333 verify(mRunner, times(1)).invokeAndCollectErrors(methodsCaptor.capture(), any()); in testAfterClass_runAsAfterClassForFailingTest()
346 verify(mRunner, times(1)) in testAfterClassRunOnlyOnce_passingTest()
355 verify(mRunner, times(1)) in testAfterClassRunOnlyOnce_failingTest()
369 verify(listener, times(1)).testIgnored(any()); in testIgnore_excludedClasses()
[all …]
/platform_testing/libraries/device-collectors/src/test/java/android/device/preparers/
DGarbageCollectionPreparerTest.java25 import static org.mockito.Mockito.verify;
92 verify(mGcHelper).setUp(TEST_PROCESS_NAME_1); in testHelperReceivesOneProcess()
104 verify(mGcHelper).setUp(TEST_PROCESS_NAME_1, TEST_PROCESS_NAME_2); in testHelperReceivesMultipleProcesses()
117 verify(mGcHelper, times(2)).garbageCollect(); in testHelperGcsDefaultWaitTimeWhenUnprovided()
131 verify(mGcHelper, times(2)).garbageCollect(); in testHelperGcsDefaultWaitTimeWhenInvalid()
145 verify(mGcHelper, times(2)).garbageCollect(TEST_WAIT_TIME); in testHelperGcsProvidedWaitTime()
159 verify(mGcHelper, times(1)).garbageCollect(); in testHelperGcsNoRunEnd()
173 verify(mGcHelper, times(2)).garbageCollect(); in testHelperGcsRunEnd()
/platform_testing/libraries/health/runners/longevity/host/tests/src/android/host/test/longevity/listener/
DErrorTerminatorTest.java19 import static org.mockito.Mockito.verify;
51 verify(mNotifier).pleaseStop(); in testErrorTerminator_errors()
63 verify(mNotifier, never()).pleaseStop(); in testErrorTerminator_none()
DTimeoutTerminatorTest.java19 import static org.mockito.Mockito.verify;
56 verify(mNotifier, never()).pleaseStop(); in testTimeoutTerminator_pass()
67 verify(mNotifier).pleaseStop(); in testTimeoutTerminator_timeout()
/platform_testing/libraries/health/runners/longevity/platform/tests/src/android/platform/test/longevity/listener/
DTimeoutTerminatorTest.java19 import static org.mockito.Mockito.verify;
58 verify(mNotifier, never()).pleaseStop(); in testTimeoutTerminator_pass()
69 verify(mNotifier).pleaseStop(); in testTimeoutTerminator_timeout()

12