Home
last modified time | relevance | path

Searched refs:mMockContext (Results 1 – 8 of 8) sorted by relevance

/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/multi/
DMixImageZipPreparerTest.java87 private IInvocationContext mMockContext; field in MixImageZipPreparerTest
154 mMockContext = null; in setUp()
169 mMockContext = Mockito.mock(InvocationContext.class); in setUpPreparerAndSystem()
175 Mockito.when(mMockContext.getDevice(SYSTEM_LABEL)).thenReturn(mockSystem); in setUpPreparerAndSystem()
176 Mockito.when(mMockContext.getBuildInfo(mockSystem)).thenReturn(mSystemBuild); in setUpPreparerAndSystem()
201 mMockContext = Mockito.mock(InvocationContext.class); in setUpPreparerAndSystemWithFileMapping()
207 Mockito.when(mMockContext.getDevice(SYSTEM_LABEL)).thenReturn(mockSystem); in setUpPreparerAndSystemWithFileMapping()
208 Mockito.when(mMockContext.getBuildInfo(mockSystem)).thenReturn(mSystemBuild); in setUpPreparerAndSystemWithFileMapping()
237 Mockito.when(mMockContext.getDevice(DEVICE_LABEL)).thenReturn(mockDevice); in setUpDevice()
238 Mockito.when(mMockContext.getBuildInfo(mockDevice)).thenReturn(mDeviceBuild); in setUpDevice()
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/
DClangCodeCoverageCollectorTest.java114 @Mock IInvocationContext mMockContext; field in ClangCodeCoverageCollectorTest
140 doReturn(ImmutableList.of(mMockDevice)).when(mMockContext).getDevices(); in setUp()
141 when(mMockContext.getAttributes()) in setUp()
166 mListener.init(mMockContext, mFakeListener); in coverageDisabled_noCoverageLog()
181 mListener.init(mMockContext, mFakeListener); in clangCoverageDisabled_noCoverageLog()
204 mListener.init(mMockContext, mFakeListener); in coverageFlushEnabled_flushCalled()
233 mListener.init(mMockContext, mFakeListener); in testRun_misc_trace_only_logsCoverageFile()
290 mListener.init(mMockContext, mFakeListener); in testRun_local_tmp_only_logsCoverageFile()
343 mListener.init(mMockContext, mFakeListener); in testRun_both_locations_logsCoverageFile()
392 when(mMockContext.getAttributes()).thenReturn(new MultiMap(ImmutableMap.of())); in testRun_noModuleName_logsCoverageFile()
[all …]
DJavaCodeCoverageCollectorTest.java110 @Mock IInvocationContext mMockContext; field in JavaCodeCoverageCollectorTest
133 when(mMockContext.getDevices()).thenReturn(ImmutableList.of(mMockDevice)); in setUp()
134 when(mMockContext.getAttributes()) in setUp()
160 mCodeCoverageCollector.init(mMockContext, mFakeListener); in testRunEnded_noCoverageEnabled_noop()
182 mCodeCoverageCollector.init(mMockContext, mFakeListener); in testRunEnded_rootEnabled_logsCoverageMeasurement()
209 when(mMockContext.getAttributes()).thenReturn(new MultiMap(ImmutableMap.of())); in testRunEnded_rootEnabled_noModuleName_logsCoverageMeasurement()
214 mCodeCoverageCollector.init(mMockContext, mFakeListener); in testRunEnded_rootEnabled_noModuleName_logsCoverageMeasurement()
232 mCodeCoverageCollector.init(mMockContext, mFakeListener); in testFailure_unableToPullFile()
250 mCodeCoverageCollector.init(mMockContext, mFakeListener); in testRunEnded_rootDisabled_enablesRootBeforePullingFiles()
269 mCodeCoverageCollector.init(mMockContext, mFakeListener); in testRunEnded_rootDisabled_noLogIfCannotEnableRoot()
[all …]
DGcovCodeCoverageCollectorTest.java89 @Mock IInvocationContext mMockContext; field in GcovCodeCoverageCollectorTest
111 doReturn(ImmutableList.of(mMockDevice)).when(mMockContext).getDevices(); in setUp()
140 mCodeCoverageListener.init(mMockContext, mFakeListener); in test_logsCoverageZip()
172 mCodeCoverageListener.init(mMockContext, mFakeListener); in testNoCoverageFiles_logsEmptyZip()
199 mCodeCoverageListener.init(mMockContext, mFakeListener); in testCoverageFlushAllProcesses_flushAllCommandCalled()
220 mCodeCoverageListener.init(mMockContext, mFakeListener); in testCoverageFlushSpecificProcesses_flushCommandCalled()
237 mCodeCoverageListener.init(mMockContext, mFakeListener); in testFailure_unableToPullFile()
257 mCodeCoverageListener.init(mMockContext, mFakeListener); in testNoCollectOnTestEnd_noCoverageMeasurements()
301 mCodeCoverageListener.init(mMockContext, mFakeListener); in testInit_adbRootAndCoverageFlushed()
DGcovKernelCodeCoverageCollectorTest.java85 @Mock IInvocationContext mMockContext; field in GcovKernelCodeCoverageCollectorTest
121 doReturn(ImmutableList.of(mMockDevice)).when(mMockContext).getDevices(); in setUp()
122 doReturn(mContextAttributes).when(mMockContext).getAttributes(); in setUp()
206 mKernelCodeCoverageListener.init(mMockContext, mFakeListener); in configuredRun()
/tools/tradefederation/core/javatests/com/android/tradefed/sandbox/
DTradefedSandboxTest.java65 private IInvocationContext mMockContext; field in TradefedSandboxTest
93 mMockContext = new InvocationContext(); in setUp()
94 mMockContext.setConfigurationDescriptor(new ConfigurationDescriptor()); in setUp()
144 Exception res = mSandbox.prepareEnvironment(mMockContext, mMockConfig, mMockListener); in testPrepareEnvironment()
191 Exception res = mSandbox.prepareEnvironment(mMockContext, mMockConfig, mMockListener); in testPrepareEnvironment_dumpConfigFail()
235 Exception res = mSandbox.prepareEnvironment(mMockContext, mMockConfig, mMockListener); in testPrepareEnvironment_dumpConfigFail_fallback_fail()
270 Exception res = mSandbox.prepareEnvironment(mMockContext, mMockConfig, mMockListener); in testPrepareEnvironment_noTfDirJar()
310 mMockContext, in testSandboxOptions()
338 mMockContext, in testSandboxOptions_exclusion()
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/junit4/
DBaseHostJUnit4TestTest.java130 private IInvocationContext mMockContext; field in BaseHostJUnit4TestTest
139 mMockContext = new InvocationContext(); in setUp()
140 mMockContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
141 mMockContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockBuild); in setUp()
148 mTestInfo = TestInformation.newBuilder().setInvocationContext(mMockContext).build(); in setUp()
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/
DGTestTest.java56 @Mock IInvocationContext mMockContext; field in GTestTest
74 when(mMockContext.getDevices()).thenReturn(ImmutableList.of(mMockITestDevice)); in setUp()
105 mTestInfo = TestInformation.newBuilder().setInvocationContext(mMockContext).build(); in setUp()