Home
last modified time | relevance | path

Searched refs:mMockDevice (Results 1 – 25 of 89) sorted by relevance

1234

/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DDeviceSetupTest.java46 private ITestDevice mMockDevice; field in DeviceSetupTest
59 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
61 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("foo").anyTimes(); in setUp()
62 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
63 EasyMock.expect(mMockDevice.getIDevice()).andStubReturn(mMockIDevice); in setUp()
85 EasyMock.replay(mMockDevice); in testSetup()
87 mDeviceSetup.setUp(mMockDevice, mMockBuildInfo); in testSetup()
89 EasyMock.verify(mMockDevice); in testSetup()
108 EasyMock.replay(mMockDevice); in testSetup_airplane_mode_on()
111 mDeviceSetup.setUp(mMockDevice, mMockBuildInfo); in testSetup_airplane_mode_on()
[all …]
DInstallApexModuleTargetPreparerTest.java54 private ITestDevice mMockDevice; field in InstallApexModuleTargetPreparerTest
83 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
86 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp()
87 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
173 mMockDevice.deleteFile(APEX_DATA_DIR + "*"); in testSetupSuccess_removeExistingStagedApexSuccess()
175 mMockDevice.deleteFile(SESSION_DATA_DIR + "*"); in testSetupSuccess_removeExistingStagedApexSuccess()
177 mMockDevice.deleteFile(STAGING_DATA_DIR + "*"); in testSetupSuccess_removeExistingStagedApexSuccess()
181 EasyMock.expect(mMockDevice.executeShellV2Command("ls " + APEX_DATA_DIR)).andReturn(res); in testSetupSuccess_removeExistingStagedApexSuccess()
182 EasyMock.expect(mMockDevice.executeShellV2Command("ls " + SESSION_DATA_DIR)).andReturn(res); in testSetupSuccess_removeExistingStagedApexSuccess()
183 EasyMock.expect(mMockDevice.executeShellV2Command("ls " + STAGING_DATA_DIR)).andReturn(res); in testSetupSuccess_removeExistingStagedApexSuccess()
[all …]
DFastbootDeviceFlasherTest.java54 private ITestDevice mMockDevice; field in FastbootDeviceFlasherTest
62 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
63 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(TEST_STRING); in setUp()
64 EasyMock.expect(mMockDevice.getProductType()).andStubReturn(TEST_STRING); in setUp()
65 EasyMock.expect(mMockDevice.getBuildId()).andStubReturn("1"); in setUp()
66 EasyMock.expect(mMockDevice.getBuildFlavor()).andStubReturn("test-debug"); in setUp()
67 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
97 mMockDevice.rebootIntoBootloader(); in testFlash_deviceNotAvailable()
99 mMockDevice.executeFastbootCommand((String)EasyMock.anyObject(), in testFlash_deviceNotAvailable()
102 EasyMock.replay(mMockDevice); in testFlash_deviceNotAvailable()
[all …]
DPushFilePreparerTest.java55 private ITestDevice mMockDevice = null; field in PushFilePreparerTest
60 mMockDevice = EasyMock.createStrictMock(ITestDevice.class); in setUp()
61 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
62 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("SERIAL"); in setUp()
70 EasyMock.replay(mMockDevice); in testNoop()
71 mPreparer.setUp(mMockDevice, null); in testNoop()
72 EasyMock.verify(mMockDevice); in testNoop()
79 EasyMock.replay(mMockDevice); in testLocalNoExist()
82 mPreparer.setUp(mMockDevice, null); in testLocalNoExist()
87 EasyMock.verify(mMockDevice); in testLocalNoExist()
[all …]
DDeviceFlashPreparerTest.java56 private ITestDevice mMockDevice; field in DeviceFlashPreparerTest
66 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
67 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("foo").anyTimes(); in setUp()
68 EasyMock.expect(mMockDevice.getOptions()).andReturn(new TestDeviceOptions()).anyTimes(); in setUp()
121 EasyMock.replay(mMockFlasher, mMockDevice); in testSetup()
122 mDeviceFlashPreparer.setUp(mMockDevice, mMockBuildInfo); in testSetup()
123 EasyMock.verify(mMockFlasher, mMockDevice); in testSetup()
131 mMockDevice.setRecoveryMode(RecoveryMode.ONLINE); in doSetupExpectations()
132 mMockFlasher.overrideDeviceOptions(mMockDevice); in doSetupExpectations()
135 mMockFlasher.flash(mMockDevice, mMockBuildInfo); in doSetupExpectations()
[all …]
DDefaultTestsZipInstallerTest.java47 private ITestDevice mMockDevice; field in DefaultTestsZipInstallerTest
75 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
76 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(TEST_STRING); in setUp()
77 EasyMock.expect(mMockDevice.getProductType()).andStubReturn(TEST_STRING); in setUp()
78 EasyMock.expect(mMockDevice.getBuildId()).andStubReturn("1"); in setUp()
80 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
104 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("serial_number_stub"); in testCantTouchFilesystem()
105 EasyMock.expect(mMockDevice.getRecoveryMode()).andReturn(RecoveryMode.AVAILABLE); in testCantTouchFilesystem()
106 EasyMock.expect(mMockDevice.executeShellCommand("stop")).andReturn(""); in testCantTouchFilesystem()
107 EasyMock.expect(mMockDevice.executeShellCommand("stop installd")).andReturn(""); in testCantTouchFilesystem()
[all …]
DDisableSELinuxTargetPreparerTest.java34 private ITestDevice mMockDevice; field in DisableSELinuxTargetPreparerTest
44 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
53 EasyMock.expect(mMockDevice.executeShellV2Command(GETENFORCE)).andReturn(result).once(); in testSetUpSuccess_permissive()
54 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUpSuccess_permissive()
56 mDisableSELinuxTargetPreparer.setUp(mMockDevice, mMockBuildInfo); in testSetUpSuccess_permissive()
57 mDisableSELinuxTargetPreparer.tearDown(mMockDevice, mMockBuildInfo, null); in testSetUpSuccess_permissive()
58 EasyMock.verify(mMockDevice, mMockBuildInfo); in testSetUpSuccess_permissive()
66 EasyMock.expect(mMockDevice.executeShellV2Command(GETENFORCE)).andReturn(result).once(); in testSetUpSuccess_enforced_rootBefore()
67 EasyMock.expect(mMockDevice.isAdbRoot()).andReturn(true).once(); in testSetUpSuccess_enforced_rootBefore()
68 EasyMock.expect(mMockDevice.executeShellV2Command(SETENFORCE + "0")) in testSetUpSuccess_enforced_rootBefore()
[all …]
DRestartSystemServerTargetPreparerTest.java34 private ITestDevice mMockDevice; field in RestartSystemServerTargetPreparerTest
39 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
46 EasyMock.expect(mMockDevice.enableAdbRoot()).andReturn(true).once(); in testSetUp_bootComplete()
47 EasyMock.expect(mMockDevice.executeShellCommand("setprop dev.bootcomplete 0")) in testSetUp_bootComplete()
50 mMockDevice.executeShellCommand( in testSetUp_bootComplete()
54 mMockDevice.waitForDeviceAvailable(); in testSetUp_bootComplete()
56 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUp_bootComplete()
58 mRestartSystemServerTargetPreparer.setUp(mMockDevice, mMockBuildInfo); in testSetUp_bootComplete()
59 EasyMock.verify(mMockDevice, mMockBuildInfo); in testSetUp_bootComplete()
64 EasyMock.expect(mMockDevice.enableAdbRoot()).andReturn(true).once(); in testSetUp_bootNotComplete()
[all …]
DPerfettoPreparerTest.java40 private ITestDevice mMockDevice = null; field in PerfettoPreparerTest
45 mMockDevice = EasyMock.createStrictMock(ITestDevice.class); in setUp()
46 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
47 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("SERIAL"); in setUp()
55 EasyMock.replay(mMockDevice); in testNoop()
56 mPreparer.setUp(mMockDevice, null); in testNoop()
57 EasyMock.verify(mMockDevice); in testNoop()
64 EasyMock.replay(mMockDevice); in testLocalPerfettoBinaryNoExist()
66 mPreparer.setUp(mMockDevice, null); in testLocalPerfettoBinaryNoExist()
71 EasyMock.verify(mMockDevice); in testLocalPerfettoBinaryNoExist()
[all …]
DDeviceStringPusherTest.java35 private ITestDevice mMockDevice; field in DeviceStringPusherTest
41 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
50 EasyMock.expect(mMockDevice.doesFileExist("file")).andReturn(false).once(); in testFail()
51 EasyMock.expect(mMockDevice.pushString("hi", "file")).andReturn(false).once(); in testFail()
52 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andReturn(null).once(); in testFail()
53 EasyMock.replay(mMockDevice, mMockBuildInfo); in testFail()
55 mDeviceStringPusher.setUp(mMockDevice, mMockBuildInfo); in testFail()
63 EasyMock.expect(mMockDevice.doesFileExist("file")).andReturn(false).once(); in testDoesntExist()
64 EasyMock.expect(mMockDevice.pushString("hi", "file")).andReturn(true).once(); in testDoesntExist()
65 mMockDevice.deleteFile("file"); in testDoesntExist()
[all …]
DAppSetupTest.java55 private ITestDevice mMockDevice; field in AppSetupTest
62 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
63 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp()
64 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
70 EasyMock.replay(mMockDevice, mMockBuildInfo); in replayMocks()
74 EasyMock.verify(mMockDevice, mMockBuildInfo); in verifyMocks()
85 mAppSetup.setUp(mMockDevice, new BuildInfo()); in testSetup_notIAppBuildInfo()
104 EasyMock.expect(mMockDevice.installPackage(EasyMock.eq(tmpFile), EasyMock.eq(true))) in testSetup_failToInstall()
107 mAppSetup.setUp(mMockDevice, mMockBuildInfo); in testSetup_failToInstall()
129 EasyMock.expect(mMockDevice.installPackage(EasyMock.eq(tmpFile), EasyMock.eq(true))) in testSetup_aaptCannotParse()
[all …]
DRunCommandTargetPreparerTest.java52 private ITestDevice mMockDevice = null; field in RunCommandTargetPreparerTest
58 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
74 EasyMock.expect(mMockDevice.executeShellV2Command(EasyMock.eq(command))).andReturn(res); in testSetUp()
75 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUp()
76 mPreparer.setUp(mMockDevice, mMockBuildInfo); in testSetUp()
77 EasyMock.verify(mMockDevice, mMockBuildInfo); in testSetUp()
94 mMockDevice.executeShellV2Command( in testSetUp_withTimeout()
100 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUp_withTimeout()
101 mPreparer.setUp(mMockDevice, mMockBuildInfo); in testSetUp_withTimeout()
102 EasyMock.verify(mMockDevice, mMockBuildInfo); in testSetUp_withTimeout()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DDeviceSelectionOptionsTest.java45 private IDevice mMockDevice; field in DeviceSelectionOptionsTest
81 mMockDevice = EasyMock.createMock(IDevice.class); in setUp()
82 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(DEVICE_SERIAL); in setUp()
83 EasyMock.expect(mMockDevice.isEmulator()).andStubReturn(Boolean.FALSE); in setUp()
94 assertEquals(1, options.getSerials(mMockDevice).size()); in testGetSerials()
95 assertTrue(options.getSerials(mMockDevice).contains(DEVICE_ENV_SERIAL)); in testGetSerials()
96 assertFalse(options.getSerials(mMockDevice).contains(DEVICE_SERIAL)); in testGetSerials()
139 assertEquals(1, options.getSerials(mMockDevice).size()); in testGetSerialsDoesNotOverride()
140 assertFalse(options.getSerials(mMockDevice).contains(DEVICE_ENV_SERIAL)); in testGetSerialsDoesNotOverride()
141 assertTrue(options.getSerials(mMockDevice).contains(DEVICE_SERIAL)); in testGetSerialsDoesNotOverride()
[all …]
DDeviceStateMonitorTest.java42 private IDevice mMockDevice; field in DeviceStateMonitorTest
51 mMockDevice = EasyMock.createMock(IDevice.class); in setUp()
52 EasyMock.expect(mMockDevice.getState()).andReturn(DeviceState.ONLINE); in setUp()
53 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn(SERIAL_NUMBER).anyTimes(); in setUp()
54 EasyMock.replay(mMockDevice); in setUp()
55 mMonitor = new DeviceStateMonitor(mMockMgr, mMockDevice, true); in setUp()
62 assertEquals(mMockDevice, mMonitor.waitForDeviceOnline()); in testWaitForDeviceOnline_alreadyOnline()
80 assertEquals(mMockDevice, mMonitor.waitForDeviceOnline()); in testWaitForDeviceOnline()
160 mMockDevice = EasyMock.createMock(IDevice.class); in testWaitForShellAvailable()
161 EasyMock.expect(mMockDevice.getState()).andReturn(DeviceState.ONLINE); in testWaitForShellAvailable()
[all …]
DWifiHelperTest.java36 private ITestDevice mMockDevice; field in WifiHelperTest
40 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
41 EasyMock.expect(mMockDevice.executeShellCommand(WifiHelper.CHECK_PACKAGE_CMD)) in setUp()
93 MockTestDeviceHelper.injectShellResponse(mMockDevice, null, 5, TimeUnit.MINUTES, 0, "", in testWaitForIp_failThenPass()
95 MockTestDeviceHelper.injectShellResponse(mMockDevice, null, 5, TimeUnit.MINUTES, 0, in testWaitForIp_failThenPass()
97 EasyMock.replay(mMockDevice); in testWaitForIp_failThenPass()
98 WifiHelper wifiHelper = new WifiHelper(mMockDevice) { in testWaitForIp_failThenPass()
106 EasyMock.verify(mMockDevice); in testWaitForIp_failThenPass()
115 MockTestDeviceHelper.injectShellResponse(mMockDevice, expectedCommand, 5, TimeUnit.MINUTES, in testStartMonitor()
117 EasyMock.replay(mMockDevice); in testStartMonitor()
[all …]
DWaitDeviceRecoveryTest.java41 private IDevice mMockDevice; field in WaitDeviceRecoveryTest
58 mMockDevice = EasyMock.createMock(IDevice.class); in setUp()
70 … EasyMock.expect(mMockMonitor.waitForDeviceOnline(EasyMock.anyLong())).andReturn(mMockDevice); in testRecoverDevice_success()
73 mMockDevice); in testRecoverDevice_success()
74 … EasyMock.expect(mMockMonitor.waitForDeviceOnline(EasyMock.anyLong())).andReturn(mMockDevice); in testRecoverDevice_success()
110 .andReturn(mMockDevice).anyTimes(); in testRecoverDevice_unresponsive()
114 mMockDevice.reboot((String)EasyMock.isNull()); in testRecoverDevice_unresponsive()
141 .andReturn(mMockDevice); in testRecoverDevice_fastboot()
144 mMockDevice); in testRecoverDevice_fastboot()
146 .andReturn(mMockDevice); in testRecoverDevice_fastboot()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/suite/checker/
DDeviceSettingCheckerTest.java38 private ITestDevice mMockDevice; field in DeviceSettingCheckerTest
43 mMockDevice = EasyMock.createMock(ITestDevice.class); in setup()
58 EasyMock.expect(mMockDevice.getAllSettings(EasyMock.eq("global"))) in testSettingsUnchanged()
61 EasyMock.expect(mMockDevice.getAllSettings(EasyMock.eq("secure"))) in testSettingsUnchanged()
64 EasyMock.expect(mMockDevice.getAllSettings(EasyMock.eq("system"))) in testSettingsUnchanged()
67 EasyMock.replay(mMockDevice); in testSettingsUnchanged()
68 assertEquals(CheckStatus.SUCCESS, mChecker.preExecutionCheck(mMockDevice).getStatus()); in testSettingsUnchanged()
69 assertEquals(CheckStatus.SUCCESS, mChecker.postExecutionCheck(mMockDevice).getStatus()); in testSettingsUnchanged()
70 EasyMock.verify(mMockDevice); in testSettingsUnchanged()
83 EasyMock.expect(mMockDevice.getAllSettings(EasyMock.eq("global"))).andReturn(mapPreGlobal); in testSettingsChanged()
[all …]
DSystemServerFileDescriptorCheckerTest.java35 private ITestDevice mMockDevice; field in SystemServerFileDescriptorCheckerTest
39 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
45 EasyMock.expect(mMockDevice.getProperty(EasyMock.eq("ro.build.type"))) in testFailToGetPid()
47 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testFailToGetPid()
49 EasyMock.replay(mMockDevice); in testFailToGetPid()
50 assertEquals(CheckStatus.SUCCESS, mChecker.preExecutionCheck(mMockDevice).getStatus()); in testFailToGetPid()
51 assertEquals(CheckStatus.SUCCESS, mChecker.postExecutionCheck(mMockDevice).getStatus()); in testFailToGetPid()
52 EasyMock.verify(mMockDevice); in testFailToGetPid()
57 EasyMock.expect(mMockDevice.getProperty(EasyMock.eq("ro.build.type"))) in testFailToGetFdCount()
59 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testFailToGetFdCount()
[all …]
DSystemServerStatusCheckerTest.java36 private ITestDevice mMockDevice; field in SystemServerStatusCheckerTest
40 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
53 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testPidRemainUnchanged()
56 EasyMock.replay(mMockDevice); in testPidRemainUnchanged()
57 assertEquals(CheckStatus.SUCCESS, mChecker.preExecutionCheck(mMockDevice).getStatus()); in testPidRemainUnchanged()
58 assertEquals(CheckStatus.SUCCESS, mChecker.postExecutionCheck(mMockDevice).getStatus()); in testPidRemainUnchanged()
59 EasyMock.verify(mMockDevice); in testPidRemainUnchanged()
65 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testPidChanged()
67 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testPidChanged()
69 EasyMock.expect(mMockDevice.getLastExpectedRebootTimeMillis()).andReturn(200L); in testPidChanged()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/sl4a/
DSl4aClientTest.java41 private ITestDevice mMockDevice; field in Sl4aClientTest
46 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
49 mClient = new Sl4aClient(mMockDevice, mDeviceServer.getPort(), mDeviceServer.getPort()) { in setUp()
73 EasyMock.expect(mMockDevice.executeShellCommand(Sl4aClient.IS_SL4A_RUNNING_CMD)) in testIsSl4ARunning()
76 EasyMock.expect(mMockDevice.executeShellCommand(Sl4aClient.IS_SL4A_RUNNING_CMD_OLD)) in testIsSl4ARunning()
80 EasyMock.replay(mMockDevice); in testIsSl4ARunning()
82 EasyMock.verify(mMockDevice); in testIsSl4ARunning()
90 EasyMock.expect(mMockDevice.executeShellCommand(Sl4aClient.IS_SL4A_RUNNING_CMD)) in testIsSl4ARunning_notRunning()
92 EasyMock.expect(mMockDevice.executeShellCommand(Sl4aClient.IS_SL4A_RUNNING_CMD_OLD)) in testIsSl4ARunning_notRunning()
94 EasyMock.replay(mMockDevice); in testIsSl4ARunning_notRunning()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DAppVersionFetcherTest.java38 private ITestDevice mMockDevice; field in AppVersionFetcherTest
42 mMockDevice = EasyMock.createMock(ITestDevice.class); in setup()
47 EasyMock.expect(mMockDevice.executeShellCommand(VERSION_CODE_CMD)) in testFetchVersionCode_valid()
49 EasyMock.replay(mMockDevice); in testFetchVersionCode_valid()
52 AppVersionFetcher.fetch(mMockDevice, PACKAGE_NAME, AppVersionInfo.VERSION_CODE)); in testFetchVersionCode_valid()
53 EasyMock.verify(mMockDevice); in testFetchVersionCode_valid()
58 EasyMock.expect(mMockDevice.executeShellCommand(VERSION_NAME_CMD)) in testFetchVersionName_valid()
60 EasyMock.replay(mMockDevice); in testFetchVersionName_valid()
63 AppVersionFetcher.fetch(mMockDevice, PACKAGE_NAME, AppVersionInfo.VERSION_NAME)); in testFetchVersionName_valid()
64 EasyMock.verify(mMockDevice); in testFetchVersionName_valid()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/module/
DNativeBridgeModuleControllerTest.java40 private ITestDevice mMockDevice; field in NativeBridgeModuleControllerTest
46 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
48 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
57 EasyMock.expect(mMockDevice.getIDevice()).andReturn(new StubDevice("serial")); in testStubDevice()
58 EasyMock.replay(mMockDevice); in testStubDevice()
60 EasyMock.verify(mMockDevice); in testStubDevice()
66 EasyMock.expect(mMockDevice.getIDevice()).andReturn(mMockIDevice); in testNoBridgeSupport()
67 EasyMock.expect(mMockDevice.getProperty(NativeBridgeModuleController.NATIVE_BRIDGE_PROP)) in testNoBridgeSupport()
69 EasyMock.replay(mMockDevice, mMockIDevice); in testNoBridgeSupport()
71 EasyMock.verify(mMockDevice, mMockIDevice); in testNoBridgeSupport()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/junit4/
DBaseHostJUnit4TestTest.java124 private ITestDevice mMockDevice; field in BaseHostJUnit4TestTest
132 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
134 mMockContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
139 mHostTest.setDevice(mMockDevice); in setUp()
157 EasyMock.replay(mMockListener, mMockBuild, mMockDevice); in testSimpleRun()
159 EasyMock.verify(mMockListener, mMockBuild, mMockDevice); in testSimpleRun()
169 test.setDevice(mMockDevice); in testRunDeviceTests()
172 mMockDevice.executeShellCommand( in testRunDeviceTests()
174 EasyMock.expect(mMockDevice.getIDevice()).andReturn(new StubDevice("serial")); in testRunDeviceTests()
176 mMockDevice.runInstrumentationTests( in testRunDeviceTests()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DITestSuiteTest.java102 private ITestDevice mMockDevice; field in ITestSuiteTest
268 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
269 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("SERIAL"); in setUp()
270 EasyMock.expect(mMockDevice.getIDevice()).andStubReturn(EasyMock.createMock(IDevice.class)); in setUp()
277 mTestSuite.setDevice(mMockDevice); in setUp()
282 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
341 EasyMock.replay(mMockListener, mMockDevice, mMockBuildInfo, mMockSysChecker); in replayMocks()
348 EasyMock.verify(mMockListener, mMockDevice, mMockBuildInfo, mMockSysChecker); in verifyMocks()
400 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testRun()
402 EasyMock.expect(mMockDevice.getIDevice()).andReturn(EasyMock.createMock(IDevice.class)); in testRun()
[all …]
DModuleDefinitionTest.java98 private ITestDevice mMockDevice; field in ModuleDefinitionTest
284 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
293 mModule.getModuleInvocationContext().addAllocatedDevice(DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
300 EasyMock.replay(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in replayMocks()
315 EasyMock.verify(mMockListener, mMockLogSaver, mMockLogSaverListener, mMockDevice); in verifyMocks()
335 mModule.setDevice(mMockDevice); in testRun()
337 mMockPrep.setUp(EasyMock.eq(mMockDevice), EasyMock.eq(mMockBuildInfo)); in testRun()
339 mMockCleaner.setUp(EasyMock.eq(mMockDevice), EasyMock.eq(mMockBuildInfo)); in testRun()
341 mMockTest.setDevice(EasyMock.eq(mMockDevice)); in testRun()
344 mMockCleaner.tearDown(EasyMock.eq(mMockDevice), EasyMock.eq(mMockBuildInfo), in testRun()
[all …]

1234