Home
last modified time | relevance | path

Searched refs:mMockListener (Results 1 – 25 of 61) sorted by relevance

123

/tools/tradefederation/core/tests/src/com/android/tradefed/result/proto/
DProtoResultParserTest.java61 private ILogSaverListener mMockListener; field in ProtoResultParserTest
124 mMockListener = EasyMock.createStrictMock(ILogSaverListener.class); in setUp()
126 mParser = new ProtoResultParser(mMockListener, mMainInvocationContext, true); in setUp()
152 mMockListener.invocationStarted(EasyMock.anyObject()); in testEvents()
154 mMockListener.testModuleStarted(EasyMock.anyObject()); in testEvents()
155 mMockListener.testRunStarted( in testEvents()
157 mMockListener.testStarted(test1, 5L); in testEvents()
158 mMockListener.testEnded(test1, 10L, new HashMap<String, Metric>()); in testEvents()
160 mMockListener.testStarted(test2, 11L); in testEvents()
161 mMockListener.testFailed(test2, FailureDescription.create("I failed")); in testEvents()
[all …]
DStreamProtoResultReporterTest.java52 private ITestInvocationListener mMockListener; field in StreamProtoResultReporterTest
60 mMockListener = EasyMock.createStrictMock(ITestInvocationListener.class); in setUp()
66 new StreamProtoReceiver(mMockListener, mMainInvocationContext, true); in testStream()
76 mMockListener.invocationStarted(EasyMock.anyObject()); in testStream()
78 mMockListener.testModuleStarted(EasyMock.anyObject()); in testStream()
79 mMockListener.testRunStarted( in testStream()
81 mMockListener.testStarted(test1, 5L); in testStream()
82 mMockListener.testEnded(test1, 10L, new HashMap<String, Metric>()); in testStream()
84 mMockListener.testStarted(test2, 11L); in testStream()
85 mMockListener.testFailed(test2, FailureDescription.create("I failed")); in testStream()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DPythonUnitTestResultParserTest.java61 private ITestInvocationListener mMockListener; field in PythonUnitTestResultParserTest
65 mMockListener = createMock(ITestInvocationListener.class); in setUp()
66 mParser = new PythonUnitTestResultParser(ArrayUtil.list(mMockListener), "test"); in setUp()
141 replay(mMockListener); in testParseNoTests()
143 verify(mMockListener); in testParseNoTests()
161 replay(mMockListener); in testParseSingleTestPass()
163 verify(mMockListener); in testParseSingleTestPass()
178 mMockListener.testStarted(anyObject()); in testParsePartialSingleLineMatchSkipped()
180 replay(mMockListener); in testParsePartialSingleLineMatchSkipped()
200 replay(mMockListener); in testParseSingleTestPassWithExpectedFailure()
[all …]
DInstrumentationTestTest.java113 @Mock ITestInvocationListener mMockListener; field in InstrumentationTestTest
187 mInstrumentationTest.run(mTestInfo, mMockListener); in testRun()
189 InOrder inOrder = Mockito.inOrder(mInstrumentationTest, mMockTestDevice, mMockListener); in testRun()
196 inOrder.verify(mMockListener).testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun()
197 inOrder.verify(mMockListener).testStarted(eq(TEST1), anyLong()); in testRun()
198 inOrder.verify(mMockListener).testEnded(eq(TEST1), anyLong(), eq(EMPTY_STRING_MAP)); in testRun()
199 inOrder.verify(mMockListener).testStarted(eq(TEST2), anyLong()); in testRun()
200 inOrder.verify(mMockListener).testEnded(eq(TEST2), anyLong(), eq(EMPTY_STRING_MAP)); in testRun()
201 inOrder.verify(mMockListener).testRunEnded(1, EMPTY_STRING_MAP); in testRun()
209 mInstrumentationTest.run(mTestInfo, mMockListener); in testRun_bothAbi()
[all …]
DNoisyDryRunTestTest.java59 private ITestInvocationListener mMockListener; field in NoisyDryRunTestTest
76 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
90 mMockListener.testRunStarted("com.android.tradefed.testtype.NoisyDryRunTest_parseFile", 1); in testRun()
91 mMockListener.testStarted(anyObject()); in testRun()
92 mMockListener.testEnded(anyObject(), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun()
93 mMockListener.testRunEnded(EasyMock.eq(0l), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun()
95 mMockListener.testRunStarted("com.android.tradefed.testtype.NoisyDryRunTest_parseCommands", in testRun()
97 mMockListener.testStarted(anyObject()); in testRun()
98 mMockListener.testEnded(anyObject(), EasyMock.<HashMap<String, Metric>>anyObject()); in testRun()
99 mMockListener.testStarted(anyObject()); in testRun()
[all …]
DInstrumentationFileTestTest.java67 private ITestInvocationListener mMockListener; field in InstrumentationFileTestTest
79 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
147 mMockListener.testRunStarted(TEST_PACKAGE_VALUE, 1); in testRun_singleSuccessfulTest()
148 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testRun_singleSuccessfulTest()
149 mMockListener.testEnded( in testRun_singleSuccessfulTest()
151 mMockListener.testRunEnded(EasyMock.anyLong(), EasyMock.eq(new HashMap<String, Metric>())); in testRun_singleSuccessfulTest()
153 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_singleSuccessfulTest()
154 mInstrumentationFileTest.run(mTestInfo, mMockListener); in testRun_singleSuccessfulTest()
236 mMockListener.testRunStarted(TEST_PACKAGE_VALUE, 2); in testRun_reRunOneFailedToCompleteTest()
238 mMockListener.testStarted(EasyMock.eq(test1), EasyMock.anyLong()); in testRun_reRunOneFailedToCompleteTest()
[all …]
DDeviceBatteryLevelCheckerTest.java60 private ITestInvocationListener mMockListener; field in DeviceBatteryLevelCheckerTest
97 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
125 mMockListener.testRunStarted("BatteryCharging", 2); in testNull()
126 mMockListener.testStarted(mTestDescription); in testNull()
127 mMockListener.testFailed( in testNull()
129 mMockListener.testEnded(mTestDescription, new HashMap<String, Metric>()); in testNull()
130 mMockListener.testStarted(mTestDescription2); in testNull()
133 mMockListener.testFailed(mTestDescription2, failure); in testNull()
134 mMockListener.testEnded(mTestDescription2, new HashMap<String, Metric>()); in testNull()
135 mMockListener.testRunEnded( in testNull()
[all …]
DTfTestLauncherTest.java64 private ITestInvocationListener mMockListener; field in TfTestLauncherTest
72 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
145 mMockListener.testLog((String)EasyMock.anyObject(), (LogDataType)EasyMock.anyObject(), in testRun()
149 mMockListener.testRunStarted("temporaryFiles", 1); in testRun()
150 mMockListener.testRunStarted("StdErr", 1); in testRun()
152 mMockListener.testStarted((TestDescription) EasyMock.anyObject()); in testRun()
153 mMockListener.testEnded( in testRun()
156 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun()
158 mMockListener.testRunStarted("elapsed-time", 1); in testRun()
159 mMockListener.testStarted(EasyMock.anyObject()); in testRun()
[all …]
DInstrumentationSerialTestTest.java52 private ITestInvocationListener mMockListener; field in InstrumentationSerialTestTest
58 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
97 mMockListener.testRunStarted(packageName, 0, 1); in testRun()
98 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testRun()
99 mMockListener.testEnded( in testRun()
101 mMockListener.testRunEnded(0, new HashMap<String, Metric>()); in testRun()
103 EasyMock.replay(mMockListener, mMockTestDevice); in testRun()
104 mInstrumentationSerialTest.run(mTestInfo, mMockListener); in testRun()
108 EasyMock.verify(mMockListener, mMockTestDevice); in testRun()
144 mMockListener.testRunStarted(packageName, 0); in testRun_runFailure()
[all …]
DGTestFuncTest.java39 private ITestInvocationListener mMockListener = null; field in GTestFuncTest
56 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
68 mMockListener.testRunStarted(NATIVE_SAMPLETEST_MODULE_NAME, 7); in testRun()
82 mMockListener.testStarted(id); in testRun()
85 mMockListener.testFailed( in testRun()
89 mMockListener.testEnded(id, emptyMap); in testRun()
91 mMockListener.testRunEnded( in testRun()
93 EasyMock.replay(mMockListener); in testRun()
94 mGTest.run(mTestInfo, mMockListener); in testRun()
95 EasyMock.verify(mMockListener); in testRun()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DModuleDefinitionTest.java110 private ITestInvocationListener mMockListener; field in ModuleDefinitionTest
308 mMockListener = EasyMock.createNiceMock(ITestInvocationListener.class); in setUp()
341 EasyMock.replay(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in replayMocks()
356 EasyMock.verify(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in verifyMocks()
431 mMockListener.testRunStarted( in testRun()
433 mMockListener.testRunEnded( in testRun()
436 mModule.run(mModuleInfo, mMockListener); in testRun()
458 mMockListener.testRunFailed(EasyMock.capture(failureDescription)); in testDynamicDownloadThrows_ReportsRunFailed()
461 module.run(mModuleInfo, mMockListener); in testDynamicDownloadThrows_ReportsRunFailed()
486 mMockListener.testRunStarted( in testRun_tearDownException()
[all …]
DITestSuiteTest.java117 private ITestInvocationListener mMockListener; field in ITestSuiteTest
298 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
374 EasyMock.replay(mMockListener, mMockDevice, mMockBuildInfo, mMockSysChecker); in replayMocks()
381 EasyMock.verify(mMockListener, mMockDevice, mMockBuildInfo, mMockSysChecker); in verifyMocks()
445 expectTestRun(mMockListener); in testRun()
447 mTestSuite.run(mTestInfo, mMockListener); in testRun()
472 expectTestRun(mMockListener); in testRun_whiteListPreparer()
474 mTestSuite.run(mTestInfo, mMockListener); in testRun_whiteListPreparer()
496 EasyMock.anyObject(), EasyMock.same(mMockListener))) in testRun_failedSystemChecker()
501 expectTestRun(mMockListener); in testRun_failedSystemChecker()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/python/
DPythonBinaryHostTestTest.java73 private ITestInvocationListener mMockListener; field in PythonBinaryHostTestTest
82 mMockListener = EasyMock.createNiceMock(ITestInvocationListener.class); in setUp()
131 mMockListener.testRunStarted( in testRun()
136 mMockListener.testLog( in testRun()
140 mMockListener.testLog( in testRun()
146 EasyMock.replay(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRun()
147 mTest.run(mTestInfo, mMockListener); in testRun()
148 EasyMock.verify(mMockRunUtil, mMockBuildInfo, mMockListener, mMockDevice); in testRun()
172 mMockListener.testRunStarted(EasyMock.eq(binary.getName()), EasyMock.eq(0)); in testRun_failWithIncludeFilters()
173 mMockListener.testRunFailed((FailureDescription) EasyMock.anyObject()); in testRun_failWithIncludeFilters()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ddmlib/
DInstrumentationResultProtoParserTest.java52 private ITestRunListener mMockListener; field in InstrumentationResultProtoParserTest
73 mMockListener = EasyMock.createStrictMock(ITestRunListener.class); in setUp()
74 runListeners.add(mMockListener); in setUp()
162 mMockListener.testRunStarted(RUN_KEY, 0); in testNullProtoFile()
163 mMockListener.testRunFailed(EasyMock in testNullProtoFile()
165 mMockListener.testRunEnded(0, Collections.emptyMap()); in testNullProtoFile()
178 mMockListener.testRunStarted(RUN_KEY, 0); in testEmptyProtoFile()
179 mMockListener.testRunFailed(EasyMock in testEmptyProtoFile()
181 mMockListener.testRunEnded(0, Collections.emptyMap()); in testEmptyProtoFile()
197 mMockListener.testRunStarted(RUN_KEY, 0); in testInvalidResultsProtoFile()
[all …]
DTestRunToTestInvocationForwarderTest.java41 private ITestLifeCycleReceiver mMockListener; field in TestRunToTestInvocationForwarderTest
45 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
46 mForwarder = new TestRunToTestInvocationForwarder(mMockListener); in setUp()
55 mMockListener.testRunStarted(RUN_NAME, 2); in testForwarding()
57 mMockListener.testStarted(td1); in testForwarding()
58 mMockListener.testFailed(td1, "I failed"); in testForwarding()
59 mMockListener.testEnded(td1, new HashMap<String, Metric>()); in testForwarding()
61 mMockListener.testStarted(td2); in testForwarding()
62 mMockListener.testFailed(td2, "I failed"); in testForwarding()
63 mMockListener.testEnded(td2, new HashMap<String, Metric>()); in testForwarding()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/
DShardListenerTest.java43 private ITestInvocationListener mMockListener; field in ShardListenerTest
50 mMockListener = EasyMock.createMock(ILogSaverListener.class); in setUp()
52 mShardListener = new ShardListener(mMockListener); in setUp()
63 mMockListener.invocationStarted(mContext); in testBufferAndReplay()
64 mMockListener.testRunStarted( in testBufferAndReplay()
67 mMockListener.testStarted(tid, 0l); in testBufferAndReplay()
68 mMockListener.testEnded(tid, 0l, new HashMap<String, Metric>()); in testBufferAndReplay()
69 mMockListener.testRunEnded(0l, new HashMap<String, Metric>()); in testBufferAndReplay()
70 mMockListener.invocationEnded(0l); in testBufferAndReplay()
72 EasyMock.replay(mMockListener, mMockDevice); in testBufferAndReplay()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/
DBaseDeviceMetricCollectorTest.java62 private ITestInvocationListener mMockListener; field in BaseDeviceMetricCollectorTest
72 mMockListener = Mockito.mock(ITestInvocationListener.class); in setUp()
77 mBase.init(mContext, mMockListener); in testInitAndForwarding()
95 Mockito.verify(mMockListener, times(1)).invocationStarted(Mockito.any()); in testInitAndForwarding()
96 Mockito.verify(mMockListener, times(1)).testModuleStarted(Mockito.any()); in testInitAndForwarding()
97 Mockito.verify(mMockListener, times(1)) in testInitAndForwarding()
100 Mockito.verify(mMockListener, times(1)).testStarted(Mockito.eq(test), Mockito.anyLong()); in testInitAndForwarding()
101 Mockito.verify(mMockListener, times(1)) in testInitAndForwarding()
103 Mockito.verify(mMockListener, times(1)).testFailed(test, "trace"); in testInitAndForwarding()
104 Mockito.verify(mMockListener, times(1)).testAssumptionFailure(test, "trace"); in testInitAndForwarding()
[all …]
DLogcatOnFailureCollectorTest.java48 private ITestInvocationListener mMockListener; field in LogcatOnFailureCollectorTest
89 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
110 mMockListener.testRunStarted( in testCollect()
113 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testCollect()
114 mMockListener.testFailed(EasyMock.eq(test), (String) EasyMock.anyObject()); in testCollect()
115 mMockListener.testEnded( in testCollect()
119 mMockListener.testRunEnded(0L, new HashMap<String, Metric>()); in testCollect()
126 mMockListener.testLog( in testCollect()
131 EasyMock.replay(mMockListener, mMockDevice, mMockReceiver, mNullMockDevice); in testCollect()
132 mTestListener = mCollector.init(mContext, mMockListener); in testCollect()
[all …]
DFilePullerLogCollectorTest.java50 private ITestInvocationListener mMockListener; field in FilePullerLogCollectorTest
57 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
70 ITestInvocationListener listener = mCollector.init(mContext, mMockListener); in testSkipStub()
77 mMockListener.testStarted(test, 0L); in testSkipStub()
79 mMockListener.testEnded(EasyMock.eq(test), EasyMock.eq(50L), EasyMock.capture(capture)); in testSkipStub()
81 EasyMock.replay(mMockDevice, mMockListener); in testSkipStub()
84 EasyMock.verify(mMockDevice, mMockListener); in testSkipStub()
99 ITestInvocationListener listener = mCollector.init(mContext, mMockListener); in testPullAndLog()
106 mMockListener.testStarted(test, 0L); in testPullAndLog()
111 mMockListener.testLog( in testPullAndLog()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/retry/
DResultsPlayerTest.java49 private ITestInvocationListener mMockListener; field in ResultsPlayerTest
60 mMockListener = EasyMock.createStrictMock(ITestInvocationListener.class); in setUp()
86 mMockListener.testRunStarted("run1", 2); in testReplay()
88 mMockListener.testStarted(EasyMock.eq(test), EasyMock.anyLong()); in testReplay()
89 mMockListener.testEnded( in testReplay()
92 mMockListener.testStarted(EasyMock.eq(testFail), EasyMock.anyLong()); in testReplay()
93 mMockListener.testFailed(testFail, "fail0"); in testReplay()
94 mMockListener.testEnded( in testReplay()
98 mMockListener.testRunEnded(500L, new HashMap<String, Metric>()); in testReplay()
100 EasyMock.replay(mMockListener, mMockDevice, mMockConfig, mMockLogOutput); in testReplay()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DJUnitXmlParserTest.java45 private ITestInvocationListener mMockListener; field in JUnitXmlParserTest
49 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
56 new JUnitXmlParser(mMockListener).parse(new ByteArrayInputStream(new byte[0])); in testEmptyParse()
66 mMockListener.testRunStarted("runName", 3); in testParse()
68 mMockListener.testStarted(test1); in testParse()
69 mMockListener.testEnded(test1, new HashMap<String, Metric>()); in testParse()
72 mMockListener.testStarted(test2); in testParse()
73 mMockListener.testEnded(test2, new HashMap<String, Metric>()); in testParse()
76 mMockListener.testStarted(test3); in testParse()
77 mMockListener.testFailed( in testParse()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/postprocessor/
DBasePostProcessorTest.java158 private ITestInvocationListener mMockListener; field in BasePostProcessorTest
167 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
199 ITestInvocationListener listener = mProcessor.init(mMockListener); in testRunLevelPostProcessing()
204 mMockListener.testRunEnded(EasyMock.anyLong(), EasyMock.capture(capture)); in testRunLevelPostProcessing()
206 EasyMock.replay(mMockListener); in testRunLevelPostProcessing()
208 EasyMock.verify(mMockListener); in testRunLevelPostProcessing()
226 mMockListener = EasyMock.createNiceMock(ITestInvocationListener.class); in testRunLogsPostProcessing_processRunLogs()
231 mMockLogSaver, Arrays.asList(mProcessor.init(mMockListener))); in testRunLogsPostProcessing_processRunLogs()
234 mMockListener.testRunEnded(EasyMock.anyLong(), EasyMock.capture(capture)); in testRunLogsPostProcessing_processRunLogs()
236 EasyMock.replay(mMockListener, mMockLogSaver); in testRunLogsPostProcessing_processRunLogs()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/binary/
DExecutableHostTestTest.java64 private ITestInvocationListener mMockListener; field in ExecutableHostTestTest
71 mMockListener = Mockito.mock(ITestInvocationListener.class); in setUp()
88 mExecutableTest.run(mTestInfo, mMockListener); in testRunHostExecutable_noBinaries()
90 verify(mMockListener, times(0)).testRunStarted(any(), anyInt()); in testRunHostExecutable_noBinaries()
99 mExecutableTest.run(mTestInfo, mMockListener); in testRunHostExecutable_doesNotExists()
101 verify(mMockListener, Mockito.times(1)).testRunStarted(eq("test"), eq(0)); in testRunHostExecutable_doesNotExists()
107 verify(mMockListener, Mockito.times(1)).testRunFailed(failure); in testRunHostExecutable_doesNotExists()
108 verify(mMockListener, Mockito.times(1)) in testRunHostExecutable_doesNotExists()
128 mExecutableTest.run(mTestInfo, mMockListener); in testRunHostExecutable()
130 verify(mMockListener, Mockito.times(1)).testRunStarted(eq(tmpBinary.getName()), eq(1)); in testRunHostExecutable()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DLogcatCrashResultForwarderTest.java37 private ITestInvocationListener mMockListener; field in LogcatCrashResultForwarderTest
42 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
50 mReporter = new LogcatCrashResultForwarder(mMockDevice, mMockListener); in testCaptureTestCrash_noCrashInLogcat()
53 mMockListener.testStarted(test, 0L); in testCaptureTestCrash_noCrashInLogcat()
56 mMockListener.testFailed( in testCaptureTestCrash_noCrashInLogcat()
59 mMockListener.testEnded(test, 5L, new HashMap<String, Metric>()); in testCaptureTestCrash_noCrashInLogcat()
61 EasyMock.replay(mMockListener, mMockDevice); in testCaptureTestCrash_noCrashInLogcat()
65 EasyMock.verify(mMockListener, mMockDevice); in testCaptureTestCrash_noCrashInLogcat()
75 mReporter = new LogcatCrashResultForwarder(mMockDevice, mMockListener); in testCaptureTestCrash_oneCrashingLogcat()
78 mMockListener.testStarted(test, 0L); in testCaptureTestCrash_oneCrashingLogcat()
[all …]
DBugreportCollectorTest.java42 private ITestInvocationListener mMockListener = null; field in BugreportCollectorTest
73 mMockListener = EasyMock.createMock(ITestInvocationListener.class); in setUp()
78 mCollector = new BugreportCollector(mMockListener, mMockDevice); in setUp()
158 setListenerTestRunExpectations(mMockListener, "runName", "testName"); in testPassThrough()
173 setListenerTestRunExpectations(mMockListener, "runName1", "testName1", true /*failed*/); in testTestFailed()
174 mMockListener.testLog(EasyMock.contains("bug-FAILED-FooTest__testName1."), in testTestFailed()
176 setListenerTestRunExpectations(mMockListener, "runName2", "testName2", true /*failed*/); in testTestFailed()
177 mMockListener.testLog(EasyMock.contains("bug-FAILED-FooTest__testName2."), in testTestFailed()
194 setListenerTestRunExpectations(mMockListener, "runName1", "testName1"); in testTestEnded()
195 mMockListener.testLog(EasyMock.contains("bug-FooTest__testName1."), in testTestEnded()
[all …]

123