Home
last modified time | relevance | path

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

123

/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DDeviceSetupTest.java45 private ITestDevice mMockDevice; field in DeviceSetupTest
58 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
60 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("foo").anyTimes(); in setUp()
61 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
62 EasyMock.expect(mMockDevice.getIDevice()).andStubReturn(mMockIDevice); in setUp()
84 EasyMock.replay(mMockDevice); in testSetup()
86 mDeviceSetup.setUp(mMockDevice, mMockBuildInfo); in testSetup()
88 EasyMock.verify(mMockDevice); in testSetup()
107 EasyMock.replay(mMockDevice); in testSetup_airplane_mode_on()
110 mDeviceSetup.setUp(mMockDevice, mMockBuildInfo); in testSetup_airplane_mode_on()
[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 …]
DFastbootDeviceFlasherTest.java51 private ITestDevice mMockDevice; field in FastbootDeviceFlasherTest
63 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
64 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(TEST_STRING); in setUp()
65 EasyMock.expect(mMockDevice.getProductType()).andStubReturn(TEST_STRING); in setUp()
66 EasyMock.expect(mMockDevice.getBuildId()).andStubReturn("1"); in setUp()
67 EasyMock.expect(mMockDevice.getBuildFlavor()).andStubReturn("test-debug"); in setUp()
68 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 …]
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 …]
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 …]
DRootTargetPreparerTest.java32 private ITestDevice mMockDevice; field in RootTargetPreparerTest
38 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
44 EasyMock.expect(mMockDevice.isAdbRoot()).andReturn(true).once(); in testSetUpSuccess_rootBefore()
45 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUpSuccess_rootBefore()
47 mRootTargetPreparer.setUp(mMockDevice, mMockBuildInfo); in testSetUpSuccess_rootBefore()
48 mRootTargetPreparer.tearDown(mMockDevice, mMockBuildInfo, null); in testSetUpSuccess_rootBefore()
49 EasyMock.verify(mMockDevice, mMockBuildInfo); in testSetUpSuccess_rootBefore()
54 EasyMock.expect(mMockDevice.isAdbRoot()).andReturn(false).once(); in testSetUpSuccess_notRootBefore()
55 EasyMock.expect(mMockDevice.enableAdbRoot()).andReturn(true).once(); in testSetUpSuccess_notRootBefore()
56 EasyMock.expect(mMockDevice.disableAdbRoot()).andReturn(true).once(); in testSetUpSuccess_notRootBefore()
[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 EasyMock.expect(mMockDevice.executeShellCommand("rm -f file")).andReturn(null).once(); in testDoesntExist()
[all …]
DStopServicesSetupTest.java32 private ITestDevice mMockDevice = null; field in StopServicesSetupTest
40 mMockDevice = EasyMock.createStrictMock(ITestDevice.class); in setUp()
48 EasyMock.expect(mMockDevice.executeShellCommand("stop")).andReturn(null); in testNoop()
50 EasyMock.replay(mMockDevice); in testNoop()
51 mPreparer.setUp(mMockDevice, null); in testNoop()
52 EasyMock.verify(mMockDevice); in testNoop()
61 EasyMock.replay(mMockDevice); in testNoStopFramework()
62 mPreparer.setUp(mMockDevice, null); in testNoStopFramework()
63 EasyMock.verify(mMockDevice); in testNoStopFramework()
73 EasyMock.expect(mMockDevice.executeShellCommand("stop")).andReturn(null); in testStopServices()
[all …]
DRunCommandTargetPreparerTest.java49 private ITestDevice mMockDevice = null; field in RunCommandTargetPreparerTest
57 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
70 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("SERIAL").times(2); in testSetUp()
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()
90 EasyMock.expect(mMockDevice.getSerialNumber()).andReturn("SERIAL").times(2); in testSetUp_withTimeout()
95 mMockDevice.executeShellV2Command( in testSetUp_withTimeout()
101 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUp_withTimeout()
[all …]
DDeviceStorageFillerTest.java33 private ITestDevice mMockDevice; field in DeviceStorageFillerTest
39 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
50 EasyMock.expect(mMockDevice.getPartitionFreeSpace("/p")).andReturn(1L).once(); in testSetUpWriteFile()
51 EasyMock.expect(mMockDevice.executeShellCommand("fallocate -l 1000 /p/f")) in testSetUpWriteFile()
54 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUpWriteFile()
56 mDeviceStorageFiller.setUp(mMockDevice, mMockBuildInfo); in testSetUpWriteFile()
57 EasyMock.verify(mMockBuildInfo, mMockDevice); in testSetUpWriteFile()
66 EasyMock.expect(mMockDevice.getPartitionFreeSpace("/p")).andReturn(1L).once(); in testSetUpSkip()
67 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSetUpSkip()
69 mDeviceStorageFiller.setUp(mMockDevice, mMockBuildInfo); in testSetUpSkip()
[all …]
DPushFilePreparerTest.java42 private ITestDevice mMockDevice = null; field in PushFilePreparerTest
47 mMockDevice = EasyMock.createStrictMock(ITestDevice.class); in setUp()
48 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
49 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("SERIAL"); in setUp()
57 EasyMock.replay(mMockDevice); in testNoop()
58 mPreparer.setUp(mMockDevice, null); in testNoop()
59 EasyMock.verify(mMockDevice); in testNoop()
66 EasyMock.replay(mMockDevice); in testLocalNoExist()
69 mPreparer.setUp(mMockDevice, null); in testLocalNoExist()
74 EasyMock.verify(mMockDevice); in testLocalNoExist()
[all …]
DKernelFlashPreparerTest.java46 private ITestDevice mMockDevice; field in KernelFlashPreparerTest
69 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
70 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("serial"); in setUp()
71 EasyMock.expect(mMockDevice.getBuildId()).andStubReturn("0"); in setUp()
72 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
125 mMockDevice.rebootIntoBootloader(); in testSetUp()
126 EasyMock.expect(mMockDevice.executeFastbootCommand("flash", "boot", in testSetUp()
128 mMockDevice.reboot(); in testSetUp()
129 mMockDevice.postBootSetup(); in testSetUp()
131 EasyMock.replay(mMockDevice, mMockDeviceBuildInfo, mMockKernelBuildInfo); in testSetUp()
[all …]
DSystemUpdaterDeviceFlasherTest.java42 private ITestDevice mMockDevice; field in SystemUpdaterDeviceFlasherTest
52 mMockDevice = mControl.createMock(ITestDevice.class); in setUp()
54 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(TEST_STRING); in setUp()
55 EasyMock.expect(mMockDevice.getProductType()).andStubReturn(TEST_STRING); in setUp()
56 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
64 EasyMock.expect(mMockDevice.pushFile(fakeImage, "/cache/update.zip")).andReturn(true); in testFlash()
67 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.matches(commandsRegex))).andReturn( in testFlash()
69 mMockDevice.rebootIntoRecovery(); in testFlash()
70 mMockDevice.waitForDeviceAvailable(); in testFlash()
71 mMockDevice.reboot(); in testFlash()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DDeviceSelectionOptionsTest.java43 private IDevice mMockDevice; field in DeviceSelectionOptionsTest
70 mMockDevice = EasyMock.createMock(IDevice.class); in setUp()
71 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn(DEVICE_SERIAL); in setUp()
72 EasyMock.expect(mMockDevice.isEmulator()).andStubReturn(Boolean.FALSE); in setUp()
83 assertEquals(1, options.getSerials(mMockDevice).size()); in testGetSerials()
84 assertTrue(options.getSerials(mMockDevice).contains(DEVICE_ENV_SERIAL)); in testGetSerials()
85 assertFalse(options.getSerials(mMockDevice).contains(DEVICE_SERIAL)); in testGetSerials()
108 assertEquals(1, options.getSerials(mMockDevice).size()); in testGetSerialsDoesNotOverride()
109 assertFalse(options.getSerials(mMockDevice).contains(DEVICE_ENV_SERIAL)); in testGetSerialsDoesNotOverride()
110 assertTrue(options.getSerials(mMockDevice).contains(DEVICE_SERIAL)); in testGetSerialsDoesNotOverride()
[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 …]
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 …]
DManagedTestDeviceFactoryTest.java86 IDevice mMockDevice = EasyMock.createMock(IDevice.class); in testFrameworkAvailable() local
87 EasyMock.expect(mMockDevice.getState()).andReturn(DeviceState.ONLINE); in testFrameworkAvailable()
90 mMockDevice.executeShellCommand(EasyMock.eq(expectedCmd), EasyMock.eq(cor), in testFrameworkAvailable()
93 EasyMock.replay(mMockDevice); in testFrameworkAvailable()
94 assertTrue(mFactory.checkFrameworkSupport(mMockDevice)); in testFrameworkAvailable()
95 EasyMock.verify(mMockDevice); in testFrameworkAvailable()
112 IDevice mMockDevice = EasyMock.createMock(IDevice.class); in testFrameworkNotAvailable() local
113 EasyMock.expect(mMockDevice.getState()).andReturn(DeviceState.ONLINE); in testFrameworkNotAvailable()
116 mMockDevice.executeShellCommand(EasyMock.eq(expectedCmd), EasyMock.eq(cor), in testFrameworkNotAvailable()
119 EasyMock.replay(mMockDevice); in testFrameworkNotAvailable()
[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/suite/checker/
DSystemServerStatusCheckerTest.java34 private ITestDevice mMockDevice; field in SystemServerStatusCheckerTest
38 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
45 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testPidRemainUnchanged()
48 EasyMock.replay(mMockDevice); in testPidRemainUnchanged()
49 assertEquals(CheckStatus.SUCCESS, mChecker.preExecutionCheck(mMockDevice).getStatus()); in testPidRemainUnchanged()
50 assertEquals(CheckStatus.SUCCESS, mChecker.postExecutionCheck(mMockDevice).getStatus()); in testPidRemainUnchanged()
51 EasyMock.verify(mMockDevice); in testPidRemainUnchanged()
57 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testPidChanged()
59 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("pidof system_server"))) in testPidChanged()
61 EasyMock.replay(mMockDevice); in testPidChanged()
[all …]
DKeyguardStatusCheckerTest.java39 private ITestDevice mMockDevice; field in KeyguardStatusCheckerTest
43 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
53 EasyMock.expect(mMockDevice.getKeyguardState()) in testPostExecutionCheck()
55 EasyMock.replay(mMockDevice); in testPostExecutionCheck()
56 assertEquals(CheckStatus.SUCCESS, mKsc.postExecutionCheck(mMockDevice).getStatus()); in testPostExecutionCheck()
57 EasyMock.verify(mMockDevice); in testPostExecutionCheck()
66 EasyMock.expect(mMockDevice.getKeyguardState()).andReturn(createKeyguardState(true, false)); in testPostExecutionCheck_showingAfter()
67 mMockDevice.disableKeyguard(); in testPostExecutionCheck_showingAfter()
69 EasyMock.replay(mMockDevice); in testPostExecutionCheck_showingAfter()
70 assertEquals(CheckStatus.FAILED, mKsc.postExecutionCheck(mMockDevice).getStatus()); in testPostExecutionCheck_showingAfter()
[all …]
DTimeStatusCheckerTest.java35 private ITestDevice mMockDevice; field in TimeStatusCheckerTest
39 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
49 EasyMock.expect(mMockDevice.getDeviceTimeOffset(EasyMock.anyObject())).andReturn(2000L); in testCheckTimeDiff_small()
50 EasyMock.replay(mMockDevice); in testCheckTimeDiff_small()
51 assertEquals(CheckStatus.SUCCESS, mChecker.postExecutionCheck(mMockDevice).getStatus()); in testCheckTimeDiff_small()
52 EasyMock.verify(mMockDevice); in testCheckTimeDiff_small()
61 EasyMock.expect(mMockDevice.getDeviceTimeOffset(EasyMock.anyObject())).andReturn(15000L); in testCheckTimeDiff_large()
62 mMockDevice.setDate(EasyMock.anyObject()); in testCheckTimeDiff_large()
63 EasyMock.replay(mMockDevice); in testCheckTimeDiff_large()
64 assertEquals(CheckStatus.FAILED, mChecker.postExecutionCheck(mMockDevice).getStatus()); in testCheckTimeDiff_large()
[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/build/
DBootstrapBuildProviderTest.java34 private ITestDevice mMockDevice; field in BootstrapBuildProviderTest
39 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
44 EasyMock.expect(mMockDevice.getBuildId()).andReturn("5"); in testGetBuild()
45 EasyMock.expect(mMockDevice.getIDevice()).andReturn(EasyMock.createMock(IDevice.class)); in testGetBuild()
46 EasyMock.expect(mMockDevice.waitForDeviceShell(EasyMock.anyLong())).andReturn(true); in testGetBuild()
47 EasyMock.expect(mMockDevice.getProperty(EasyMock.anyObject())).andStubReturn("property"); in testGetBuild()
48 EasyMock.expect(mMockDevice.getProductVariant()).andStubReturn("variant"); in testGetBuild()
49 EasyMock.expect(mMockDevice.getBuildFlavor()).andStubReturn("flavor"); in testGetBuild()
50 EasyMock.expect(mMockDevice.getBuildAlias()).andStubReturn("alias"); in testGetBuild()
51 EasyMock.replay(mMockDevice); in testGetBuild()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DTestFailureListenerTest.java44 private ITestDevice mMockDevice; field in TestFailureListenerTest
50 mMockDevice = EasyMock.createStrictMock(ITestDevice.class); in setUp()
52 mListDevice.add(mMockDevice); in setUp()
53 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("SERIAL"); in setUp()
68 EasyMock.expect(mMockDevice.getDeviceDate()).andReturn(startDate); in testTestFailed()
70 EasyMock.expect(mMockDevice.getScreenshot()).andReturn(fakeSource); in testTestFailed()
76 EasyMock.expect(mMockDevice.logBugreport(EasyMock.anyObject(), EasyMock.anyObject())) in testTestFailed()
79 EasyMock.expect(mMockDevice.getLogcatSince(EasyMock.eq(startDate))).andReturn(fakeSource); in testTestFailed()
85 EasyMock.expect(mMockDevice.getProperty(EasyMock.eq("ro.build.type"))) in testTestFailed()
87 mMockDevice.reboot(); in testTestFailed()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/junit4/
DBaseHostJUnit4TestTest.java108 private ITestDevice mMockDevice; field in BaseHostJUnit4TestTest
116 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
118 mMockContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
123 mHostTest.setDevice(mMockDevice); in setUp()
141 EasyMock.replay(mMockListener, mMockBuild, mMockDevice); in testSimpleRun()
143 EasyMock.verify(mMockListener, mMockBuild, mMockDevice); in testSimpleRun()
153 test.setDevice(mMockDevice); in testRunDeviceTests()
156 EasyMock.expect(mMockDevice.getIDevice()).andReturn(new StubDevice("serial")); in testRunDeviceTests()
158 mMockDevice.runInstrumentationTests( in testRunDeviceTests()
162 EasyMock.replay(mMockBuild, mMockDevice); in testRunDeviceTests()
[all …]

123