Home
last modified time | relevance | path

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

/test/suite_harness/common/host-side/util/tests/src/com/android/compatibility/common/util/
DPropertyUtilTest.java42 private ITestDevice mMockDevice; field in PropertyUtilTest
46 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
51 when(mMockDevice.getProperty(FIRST_API_LEVEL)).thenReturn("31"); in testGetFirstApiLevelFromProductFirstApiLevel()
52 assertEquals(31, PropertyUtil.getFirstApiLevel(mMockDevice)); in testGetFirstApiLevelFromProductFirstApiLevel()
57 when(mMockDevice.getProperty(FIRST_API_LEVEL)).thenReturn(null); in testGetFirstApiLevelFromSdkVersion()
58 when(mMockDevice.getApiLevel()).thenReturn(31); in testGetFirstApiLevelFromSdkVersion()
60 assertEquals(31, PropertyUtil.getFirstApiLevel(mMockDevice)); in testGetFirstApiLevelFromSdkVersion()
65 when(mMockDevice.getProperty(BOARD_API_LEVEL)).thenReturn("31"); in testGetVendorApiLevelFromBoardApiLevel()
67 assertEquals(31, PropertyUtil.getVendorApiLevel(mMockDevice)); in testGetVendorApiLevelFromBoardApiLevel()
72 when(mMockDevice.getProperty(BOARD_API_LEVEL)).thenReturn(null); in testGetVendorApiLevelFromBoardFirstApiLevel()
[all …]
DBusinessLogicHostExecutorTest.java67 private ITestDevice mMockDevice; field in BusinessLogicHostExecutorTest
73 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
76 mMockDevice, mMockBuild, this, new ArrayList<String>()); 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()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/build/
DCompatibilityBuildProviderTest.java46 private ITestDevice mMockDevice; field in CompatibilityBuildProviderTest
51 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
82 IBuildInfo info = mProvider.getBuild(mMockDevice); in testBaseGetBuild()
99 when(mMockDevice.getBuildId()).thenReturn("8888"); in testBaseGetBuild_withDevice()
100 when(mMockDevice.getBuildFlavor()).thenReturn("flavor"); in testBaseGetBuild_withDevice()
101 when(mMockDevice.getBuildAlias()).thenReturn("alias"); in testBaseGetBuild_withDevice()
102 when(mMockDevice.getProperty("ro.product.name")).thenReturn("product"); in testBaseGetBuild_withDevice()
103 when(mMockDevice.getProperty("ro.build.type")).thenReturn("userdebug"); in testBaseGetBuild_withDevice()
105 IBuildInfo info = mProvider.getBuild(mMockDevice); in testBaseGetBuild_withDevice()
123 when(mMockDevice.getBuildId()).thenReturn("8888"); in testBaseGetBuild_withDeviceAndBuildFlavorPrefix()
[all …]
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/
DMediaPreparerTest.java60 private ITestDevice mMockDevice; field in MediaPreparerTest
77 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
85 context.addAllocatedDevice("device", mMockDevice); in setUp()
96 when(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).thenReturn( in testLegacySetMountPoint()
99 mMediaPreparer.setMountPoint(mMockDevice); in testLegacySetMountPoint()
109 when(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).thenReturn("/sdcard"); in testSetMountPoint()
111 mMediaPreparer.setMountPoint(mMockDevice); in testSetMountPoint()
119 when(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).thenReturn( in testDefaultModuleDirMountPoint()
122 mMediaPreparer.setMountPoint(mMockDevice); in testDefaultModuleDirMountPoint()
130 when(mMockDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE)).thenReturn( in testSetModuleDirMountPoint()
[all …]
DSettingsPreparerTest.java45 private ITestDevice mMockDevice; field in SettingsPreparerTest
56 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
57 when(mMockDevice.getDeviceDescriptor()).thenReturn(null); in setUp()
63 context.addAllocatedDevice("device", mMockDevice); in setUp()
70 when(mMockDevice.executeShellCommand(SHELL_CMD_GET)).thenReturn("\n3\n"); in testCorrectOneExpected()
78 when(mMockDevice.executeShellCommand(SHELL_CMD_GET)).thenReturn("\n3\n"); in testCorrectManyExpected()
89 when(mMockDevice.executeShellCommand(SHELL_CMD_GET)).thenReturn("\n0\n"); in testIncorrectOneExpected()
102 when(mMockDevice.executeShellCommand(SHELL_CMD_GET)).thenReturn("\n0\n"); in testIncorrectManyExpected()
118 when(mMockDevice.executeShellCommand(SHELL_CMD_PUT_7)).thenReturn("\n"); in testCommandRun()
126 when(mMockDevice.executeShellCommand(SHELL_CMD_PUT_8)).thenReturn("\n"); in testCommandRunWrongSetValue()
[all …]
DDeviceInteractionHelperInstallerTest.java50 private ITestDevice mMockDevice = null; field in DeviceInteractionHelperInstallerTest
57 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
58 when(mMockDevice.getDeviceDescriptor()).thenReturn(null); in setUp()
59 when(mMockDevice.getSerialNumber()).thenReturn("SERIAL"); in setUp()
71 when(mMockDevice.isAppEnumerationSupported()).thenReturn(true); in expectHelperInstall()
73 mMockDevice.installPackage( in expectHelperInstall()
79 when(mMockDevice.getProperty("ro.vendor.cts_interaction_helper_packages")) in expectDeviceProperty()
113 TestInformation testInfo = makeTestInfo(mMockDevice); in testNoOptionsNoDeviceProperty()
131 TestInformation testInfo = makeTestInfo(mMockDevice); in testNoOptionsEmptyDeviceProperty()
150 TestInformation testInfo = makeTestInfo(mMockDevice); in testNoOptionsValidDeviceProperty()
[all …]
DBusinessLogicPreparerTest.java64 private ITestDevice mMockDevice; field in BusinessLogicPreparerTest
161 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
259 when(mMockDevice.isPackageInstalled(anyString())).thenReturn(true); in checkAndInstallContentProvider_installed_doesNothing()
261 BusinessLogicPreparer.checkAndInstallContentProvider(mMockDevice); in checkAndInstallContentProvider_installed_doesNothing()
263 verify(mMockDevice).isPackageInstalled(eq("android.tradefed.contentprovider")); in checkAndInstallContentProvider_installed_doesNothing()
282 when(mMockDevice.getProperty(MANUFACTURER_PROPERTY)).thenReturn("MANUFACTURER_NAME"); in testBuildRequestString()
292 when(mMockDevice.executeShellCommand(LIST_FEATURE_QUERY)).thenReturn(FEATURES); in testBuildRequestString()
294 when(mMockDevice.executeShellCommand(GOOGLE_SETTINGS_QUERY)).thenReturn(PARTNER_CONTENT); in testBuildRequestString()
295 when(mMockDevice.getProperty(RO_BRAND)).thenReturn("BRAND_NAME"); in testBuildRequestString()
296 when(mMockDevice.getProperty(RO_FIRST_API_LEVEL)).thenReturn("26"); in testBuildRequestString()
[all …]
DDynamicConfigPusherTest.java60 private ITestDevice mMockDevice; field in DynamicConfigPusherTest
71 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
74 when(mMockDevice.getDeviceDescriptor()).thenReturn(null); in setUp()
76 mModuleContext.addAllocatedDevice("device", mMockDevice); in setUp()
123 File res = mPreparer.getLocalConfigFile(mMockBuildHelper, mMockDevice); in testLocalRead_fromDynamicConfigName()
144 File res = mPreparer.getLocalConfigFile(mMockBuildHelper, mMockDevice); in testLocalRead()
165 mPreparer.getLocalConfigFile(mMockBuildHelper, mMockDevice); in testLocalRead_fileNotFound()
184 mPreparer.getLocalConfigFile(mMockBuildHelper, mMockDevice); in testResourceRead_notFound()
204 res = mPreparer.getLocalConfigFile(mMockBuildHelper, mMockDevice); in testResourceRead()
224 res = mPreparer.getLocalConfigFile(mMockBuildHelper, mMockDevice); in testResourceRead_resourceFileName()
DPropertyCheckTest.java45 private ITestDevice mMockDevice; field in PropertyCheckTest
56 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
59 when(mMockDevice.getProperty(PROPERTY)).thenReturn(ACTUAL_VALUE); in setUp()
60 when(mMockDevice.getDeviceDescriptor()).thenReturn(null); in setUp()
62 context.addAllocatedDevice("device", mMockDevice); in setUp()
DIncrementalDeqpPreparerTest.java54 private ITestDevice mMockDevice; field in IncrementalDeqpPreparerTest
59 mMockDevice = mock(ITestDevice.class); in setUp()
70 mMockContext.addAllocatedDevice("device", mMockDevice); in testSkipPreparerWhenReportExists()
83 mPreparer.runIncrementalDeqp(mMockContext, mMockDevice, mMockBuildHelper); in testSkipPreparerWhenReportExists()
178 mPreparer.getBuildFingerPrint(zipFile, mMockDevice), in getBuildFingerPrint()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/result/suite/
DPreviousResultLoaderTest.java66 private ITestDevice mMockDevice; field in PreviousResultLoaderTest
81 mMockDevice = Mockito.mock(ITestDevice.class); in setUp()
121 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testReloadTests()
151 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testReloadTests_withMultiProto()
194 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testReloadTests_withRunHistory()
/test/app_compat/csuite/harness/src/test/java/com/android/csuite/core/
DTestUtilsTest.java57 private final ITestDevice mMockDevice = mock(ITestDevice.class); field in TestUtilsTest
246 when(mMockDevice.getScreenshot()).thenReturn(screenshotData); in collectScreenshot_savesToTestLog()
247 when(mMockDevice.getSerialNumber()).thenReturn("SERIAL"); in collectScreenshot_savesToTestLog()
449 context.addAllocatedDevice("device1", mMockDevice); in createTestInfo()