Home
last modified time | relevance | path

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

/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/
DMediaPreparerTest.java46 private ITestDevice mMockDevice; field in MediaPreparerTest
53 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
58 context.addAllocatedDevice("device", mMockDevice); in setUp()
64 EasyMock.expect(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).andReturn( in testSetMountPoint()
66 EasyMock.replay(mMockDevice); in testSetMountPoint()
67 mMediaPreparer.setMountPoint(mMockDevice); in testSetMountPoint()
68 EasyMock.verify(mMockDevice); in testSetMountPoint()
75 EasyMock.expect(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).andReturn( in testDefaultModuleDirMountPoint()
77 EasyMock.replay(mMockDevice); in testDefaultModuleDirMountPoint()
78 mMediaPreparer.setMountPoint(mMockDevice); in testDefaultModuleDirMountPoint()
[all …]
DDeviceInteractionHelperInstallerTest.java51 private ITestDevice mMockDevice = null; field in DeviceInteractionHelperInstallerTest
58 mMockDevice = EasyMock.createStrictMock(ITestDevice.class); in setUp()
59 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
60 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("SERIAL"); in setUp()
72 EasyMock.expect(mMockDevice.isAppEnumerationSupported()).andReturn(true); in expectHelperInstall()
74 mMockDevice.installPackage( in expectHelperInstall()
80 EasyMock.expect(mMockDevice.getProperty("ro.vendor.cts_interaction_helper_packages")) in expectDeviceProperty()
114 TestInformation testInfo = makeTestInfo(mMockDevice); in testNoOptionsNoDeviceProperty()
121 EasyMock.replay(mMockDevice); in testNoOptionsNoDeviceProperty()
123 EasyMock.verify(mMockDevice); in testNoOptionsNoDeviceProperty()
[all …]
DSettingsPreparerTest.java39 private ITestDevice mMockDevice; field in SettingsPreparerTest
51 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
52 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andReturn(null).anyTimes(); in setUp()
58 context.addAllocatedDevice("device", mMockDevice); in setUp()
64 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n3\n").once(); in testCorrectOneExpected()
66 EasyMock.replay(mMockDevice); in testCorrectOneExpected()
71 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n3\n").once(); in testCorrectManyExpected()
76 EasyMock.replay(mMockDevice); in testCorrectManyExpected()
81 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n0\n").once(); in testIncorrectOneExpected()
83 EasyMock.replay(mMockDevice); in testIncorrectOneExpected()
[all …]
DDynamicConfigPusherTest.java58 private ITestDevice mMockDevice; field in DynamicConfigPusherTest
69 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
72 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
74 mModuleContext.addAllocatedDevice("device", mMockDevice); in setUp()
85 EasyMock.replay(mMockDevice, mMockBuildInfo); in testGetSuiteName_fromTestSuiteInfo()
87 EasyMock.verify(mMockDevice, mMockBuildInfo); in testGetSuiteName_fromTestSuiteInfo()
100 EasyMock.replay(mMockDevice, mMockBuildInfo); in testGetSuiteName_fromTestSuiteTag()
102 EasyMock.verify(mMockDevice, mMockBuildInfo); in testGetSuiteName_fromTestSuiteTag()
123 EasyMock.replay(mMockDevice, mMockBuildInfo); in testLocalRead_fromDynamicConfigName()
124 File res = mPreparer.getLocalConfigFile(mMockBuildHelper, mMockDevice); in testLocalRead_fromDynamicConfigName()
[all …]
DPropertyCheckTest.java36 private ITestDevice mMockDevice; field in PropertyCheckTest
48 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
51 EasyMock.expect(mMockDevice.getProperty(PROPERTY)).andReturn(ACTUAL_VALUE).anyTimes(); in setUp()
52 EasyMock.expect(mMockDevice.getDeviceDescriptor()).andReturn(null).anyTimes(); in setUp()
54 context.addAllocatedDevice("device", mMockDevice); in setUp()
63 EasyMock.replay(mMockDevice); in testWarningMatch()
71 EasyMock.replay(mMockDevice); in testWarningMismatch()
79 EasyMock.replay(mMockDevice); in testErrorMatch()
87 EasyMock.replay(mMockDevice); in testErrorMismatch()
DBusinessLogicPreparerTest.java55 private ITestDevice mMockDevice; field in BusinessLogicPreparerTest
133 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
187 when(mMockDevice.getProperty(MANUFACTURER_PROPERTY)).thenReturn("MANUFACTURER_NAME"); in testBuildRequestString()
197 when(mMockDevice.executeShellCommand(LIST_FEATURE_QUERY)).thenReturn(FEATURES); in testBuildRequestString()
199 when(mMockDevice.executeShellCommand(GOOGLE_SETTINGS_QUERY)).thenReturn(PARTNER_CONTENT); in testBuildRequestString()
200 when(mMockDevice.getProperty(RO_BRAND)).thenReturn("BRAND_NAME"); in testBuildRequestString()
201 when(mMockDevice.getProperty(RO_FIRST_API_LEVEL)).thenReturn("26"); in testBuildRequestString()
202 when(mMockDevice.getProperty(RO_MANIFACTURER)).thenReturn("MANUFACTURER_NAME"); in testBuildRequestString()
203 when(mMockDevice.getProperty(RO_MODEL)).thenReturn("fake_model"); in testBuildRequestString()
204 when(mMockDevice.getProperty(RO_NAME)).thenReturn("fake_name"); in testBuildRequestString()
[all …]
/test/vts/tools/vts-core-tradefed/tests/src/com/android/testtype/suite/module/
DKernelTestModuleControllerTest.java44 private ITestDevice mMockDevice; field in KernelTestModuleControllerTest
52 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
55 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
63 EasyMock.expect(mMockDevice.getIDevice()).andReturn(mMockIDevice).times(2); in testModuleAbiMatchesArch()
64 EasyMock.expect(mMockDevice.getProperty(mLowMemProp)).andReturn("false"); in testModuleAbiMatchesArch()
65 EasyMock.expect(mMockDevice.getProperty(mProductNameProp)).andReturn("product"); in testModuleAbiMatchesArch()
66 EasyMock.replay(mMockDevice); in testModuleAbiMatchesArch()
76 EasyMock.expect(mMockDevice.getIDevice()).andReturn(mMockIDevice).times(2); in testModuleAbiMismatchesArch()
77 EasyMock.expect(mMockDevice.getProperty(mLowMemProp)).andReturn("false"); in testModuleAbiMismatchesArch()
78 EasyMock.expect(mMockDevice.getProperty(mProductNameProp)).andReturn("product"); in testModuleAbiMismatchesArch()
[all …]
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/
DCompatibilityBuildProviderTest.java45 private ITestDevice mMockDevice; field in CompatibilityBuildProviderTest
50 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
81 EasyMock.replay(mMockDevice); in testBaseGetBuild()
82 IBuildInfo info = mProvider.getBuild(mMockDevice); in testBaseGetBuild()
83 EasyMock.verify(mMockDevice); in testBaseGetBuild()
100 EasyMock.expect(mMockDevice.getBuildId()).andReturn("8888"); in testBaseGetBuild_withDevice()
101 EasyMock.expect(mMockDevice.getBuildFlavor()).andReturn("flavor"); in testBaseGetBuild_withDevice()
102 EasyMock.expect(mMockDevice.getBuildAlias()).andReturn("alias"); in testBaseGetBuild_withDevice()
103 EasyMock.expect(mMockDevice.getProperty("ro.product.name")).andReturn("product"); in testBaseGetBuild_withDevice()
104 EasyMock.expect(mMockDevice.getProperty("ro.build.type")).andReturn("userdebug"); in testBaseGetBuild_withDevice()
[all …]
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/
DCompatibilityTestTest.java49 private ITestDevice mMockDevice; field in CompatibilityTestTest
61 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
62 mTest.setDevice(mMockDevice); in setUp()
72 EasyMock.expect(mMockDevice.getProperty(EasyMock.eq("ro.product.cpu.abilist"))) in testGetAbis()
77 EasyMock.replay(mMockDevice); in testGetAbis()
83 EasyMock.verify(mMockDevice); in testGetAbis()
91 EasyMock.expect(mMockDevice.getProperty(EasyMock.eq("ro.product.cpu.abilist"))) in testGetAbis_notSupported()
93 EasyMock.replay(mMockDevice); in testGetAbis_notSupported()
101 EasyMock.verify(mMockDevice); in testGetAbis_notSupported()
110 EasyMock.expect(mMockDevice.getProperty(EasyMock.eq("ro.product.cpu.abi"))) in testGetAbis_primaryAbiOnly()
[all …]
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/targetprep/
DVtsTraceCollectPreparerTest.java63 private ITestDevice mMockDevice; field in VtsTraceCollectPreparerTest
69 mMockDevice = EasyMock.createNiceMock(ITestDevice.class); in setUp()
110 EasyMock.expect(mMockDevice.pushFile(EasyMock.eq(testProfilerlib32), in testOnSetUp()
114 EasyMock.expect(mMockDevice.pushFile(EasyMock.eq(testProfilerlib64), in testOnSetUp()
118 EasyMock.expect(mMockDevice.pushFile(EasyMock.eq(testVtslib32), in testOnSetUp()
122 EasyMock.expect(mMockDevice.pushFile(EasyMock.eq(testVtslib64), in testOnSetUp()
126 EasyMock.expect(mMockDevice.pushFile(EasyMock.eq(testUnrelatedlib32), in testOnSetUp()
130 EasyMock.expect(mMockDevice.pushFile(EasyMock.eq(testUnrelatedlib64), in testOnSetUp()
134 EasyMock.expect(mMockDevice.pushFile(EasyMock.eq(new File(mTestDir, in testOnSetUp()
139 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("getenforce"))) in testOnSetUp()
[all …]
/test/vts/tools/vts-core-tradefed/tests/src/com/android/compatibility/tradefed/util/
DTargetFileUtilsTest.java37 private ITestDevice mMockDevice; field in TargetFileUtilsTest
77 mMockDevice = EasyMock.createMock(ITestDevice.class); in testFindFile()
81 EasyMock.expect(mMockDevice.executeShellV2Command("find findPath -name \"namePattern\" " in testFindFile()
84 EasyMock.replay(mMockDevice); in testFindFile()
92 "findPath", "namePattern", Arrays.asList(options), mMockDevice)); in testFindFile()
98 mMockDevice = EasyMock.createMock(ITestDevice.class); in testFindFile_w_cmd_result_fail()
102 EasyMock.expect(mMockDevice.executeShellV2Command("find findPath -name \"namePattern\"")) in testFindFile_w_cmd_result_fail()
104 EasyMock.replay(mMockDevice); in testFindFile_w_cmd_result_fail()
107 findPaths, TargetFileUtils.findFile("findPath", "namePattern", null, mMockDevice)); in testFindFile_w_cmd_result_fail()
113 mMockDevice = EasyMock.createMock(ITestDevice.class); in testFindFile_w_empty_line_stdout()
[all …]
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/presubmit/
DIntegrationTest.java87 private ITestDevice mMockDevice; field in IntegrationTest
109 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
112 mTest.setDevice(mMockDevice); in setUp()
134 EasyMock.expect(mMockDevice.getSerialNumber()).andStubReturn("SERIAL"); in setUp()
140 mContext.addAllocatedDevice("default", mMockDevice); in setUp()
202 EasyMock.expect(mMockDevice.getProperty("ro.product.cpu.abilist")).andReturn(mAbi); in testSingleModuleRun()
208 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSingleModuleRun()
212 EasyMock.verify(mMockDevice, mMockBuildInfo); in testSingleModuleRun()
236 EasyMock.expect(mMockDevice.getProperty("ro.product.cpu.abilist")).andReturn(mAbi); in testSingleModuleRun_checkMetadata()
242 EasyMock.replay(mMockDevice, mMockBuildInfo); in testSingleModuleRun_checkMetadata()
[all …]
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/device/metric/
DVtsHalTraceCollectorTest.java52 private ITestDevice mMockDevice; field in VtsHalTraceCollectorTest
58 mMockDevice = EasyMock.createNiceMock(ITestDevice.class); in setUp()
78 mDevices.add(mMockDevice); in testOnTestRunEnd()
83 EasyMock.expect(mMockDevice.executeShellCommand( in testOnTestRunEnd()
89 EasyMock.expect(mMockDevice.pullFile(EasyMock.eq(VTS_TMP_DIR + "test1.vts.trace"), in testOnTestRunEnd()
93 EasyMock.expect(mMockDevice.pullFile(EasyMock.eq(VTS_TMP_DIR + "test2.vts.trace"), in testOnTestRunEnd()
100 EasyMock.replay(mMockDevice); in testOnTestRunEnd()
107 EasyMock.verify(mMockDevice); in testOnTestRunEnd()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/
DPreviousResultLoaderTest.java65 private ITestDevice mMockDevice; field in PreviousResultLoaderTest
80 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
122 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testReloadTests()
124 EasyMock.replay(mMockDevice, mMockProvider); in testReloadTests()
139 EasyMock.verify(mMockDevice, mMockProvider); in testReloadTests()
154 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testReloadTests_withMultiProto()
156 EasyMock.replay(mMockDevice, mMockProvider); in testReloadTests_withMultiProto()
173 EasyMock.verify(mMockDevice, mMockProvider); in testReloadTests_withMultiProto()
199 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testReloadTests_withRunHistory()
200 EasyMock.replay(mMockDevice, mMockProvider); in testReloadTests_withRunHistory()
[all …]
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/retry/
DRetryFactoryTestTest.java65 private ITestDevice mMockDevice; field in RetryFactoryTestTest
108 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
110 mMockContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
188 mFactory.setDevice(mMockDevice); in testValidation()
200 EasyMock.replay(mMockListener, mMockInfo, mMockDevice); in testValidation()
202 EasyMock.verify(mMockListener, mMockInfo, mMockDevice); in testValidation()
/test/suite_harness/common/host-side/util/tests/src/com/android/compatibility/common/util/
DBusinessLogicHostExecutorTest.java69 private ITestDevice mMockDevice; field in BusinessLogicHostExecutorTest
75 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
76 mExecutor = new BusinessLogicHostExecutor(mMockDevice, mMockBuild, this); in setUp()
114 assertEquals("Failed to set second argument", mArgsUsed[1], mMockDevice); in testInvokeMethodWithStringAndDeviceArgs()
122 assertEquals("Failed to set first argument", mArgsUsed[0], mMockDevice); in testInvokeMethodWithDeviceAndStringArgs()
159 assertEquals("Failed to set second argument", mArgsUsed[2], mMockDevice); in testInvokeMethodWithAllArgTypes()