/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | DeviceManagerTest.java | 75 private IManagedTestDevice mMockTestDevice; field in DeviceManagerTest 178 mMockTestDevice = EasyMock.createMock(IManagedTestDevice.class); in setUp() 182 mMockTestDevice.setIDevice(idevice); in setUp() 183 return mMockTestDevice; in setUp() 207 EasyMock.expect(mMockTestDevice.getMacAddress()).andStubReturn(MAC_ADDRESS); in setUp() 208 EasyMock.expect(mMockTestDevice.getSimState()).andStubReturn(SIM_STATE); in setUp() 209 EasyMock.expect(mMockTestDevice.getSimOperator()).andStubReturn(SIM_OPERATOR); in setUp() 211 mMockTestDevice.setIDevice(EasyMock.capture(capturedIDevice)); in setUp() 213 EasyMock.expect(mMockTestDevice.getIDevice()).andStubAnswer(new IAnswer<IDevice>() { in setUp() 219 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubAnswer(new IAnswer<String>() { in setUp() [all …]
|
D | BackgroundDeviceActionTest.java | 41 private ITestDevice mMockTestDevice; field in BackgroundDeviceActionTest 56 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 57 EasyMock.expect(mMockTestDevice.getSerialNumber()).andReturn(MOCK_DEVICE_SERIAL) in setUp() 59 EasyMock.expect(mMockTestDevice.getIDevice()).andReturn(mMockIDevice).anyTimes(); in setUp() 68 EasyMock.expect(mMockTestDevice.getDeviceState()).andReturn(TestDeviceState.ONLINE) in testBackgroundActionComplete() 73 EasyMock.replay(mMockTestDevice, mMockIDevice, mMockReceiver); in testBackgroundActionComplete() 75 new BackgroundDeviceAction(action, "desc", mMockTestDevice, mMockReceiver, 0); in testBackgroundActionComplete() 91 EasyMock.expect(mMockTestDevice.getDeviceState()).andStubReturn(mDeviceState); in testBackgroundAction_shellException() 95 EasyMock.replay(mMockTestDevice, mMockIDevice, mMockReceiver); in testBackgroundAction_shellException() 97 new BackgroundDeviceAction(action, "desc", mMockTestDevice, mMockReceiver, 0) { in testBackgroundAction_shellException() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | TestAppInstallSetupTest.java | 74 private ITestDevice mMockTestDevice; field in TestAppInstallSetupTest 128 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 129 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp() 130 EasyMock.expect(mMockTestDevice.getDeviceDescriptor()).andStubReturn(null); in setUp() 131 EasyMock.expect(mMockTestDevice.isAppEnumerationSupported()).andStubReturn(false); in setUp() 133 context.addAllocatedDevice("device", mMockTestDevice); in setUp() 147 EasyMock.expect(mMockTestDevice.installPackage(EasyMock.eq(fakeApk), EasyMock.eq(true))) in testSetupAndTeardown() 150 mMockTestDevice.installPackages( in testSetupAndTeardown() 153 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testSetupAndTeardown() 155 EasyMock.verify(mMockBuildInfo, mMockTestDevice); in testSetupAndTeardown() [all …]
|
D | InstallAllTestZipAppsSetupTest.java | 47 private ITestDevice mMockTestDevice; field in InstallAllTestZipAppsSetupTest 76 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 77 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp() 78 EasyMock.expect(mMockTestDevice.getDeviceDescriptor()).andStubReturn(null); in setUp() 79 EasyMock.expect(mMockTestDevice.isAppEnumerationSupported()).andStubReturn(false); in setUp() 106 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testGetZipFile() 107 File ret = mPrep.getZipFile(mMockTestDevice, mMockBuildInfo); in testGetZipFile() 117 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testGetZipFileDoesntExist() 118 File ret = mPrep.getZipFile(mMockTestDevice, mMockBuildInfo); in testGetZipFileDoesntExist() 125 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testNullTestZipName() [all …]
|
D | AllTestAppsInstallSetupTest.java | 23 private ITestDevice mMockTestDevice; field in AllTestAppsInstallSetupTest 33 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 34 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp() 35 EasyMock.expect(mMockTestDevice.getDeviceDescriptor()).andStubReturn(null); in setUp() 36 EasyMock.expect(mMockTestDevice.isAppEnumerationSupported()).andStubReturn(false); in setUp() 41 EasyMock.replay(mockBuildInfo, mMockTestDevice); in testNotIDeviceBuildInfo() 43 mPrep.setUp(mMockTestDevice, mockBuildInfo); in testNotIDeviceBuildInfo() 49 EasyMock.verify(mockBuildInfo, mMockTestDevice); in testNotIDeviceBuildInfo() 54 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testNoTestDir() 56 mPrep.setUp(mMockTestDevice, mMockBuildInfo); in testNoTestDir() [all …]
|
D | InstallApkSetupTest.java | 46 private ITestDevice mMockTestDevice; field in InstallApkSetupTest 56 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 57 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp() 58 EasyMock.expect(mMockTestDevice.getDeviceDescriptor()).andStubReturn(null); in setUp() 59 EasyMock.expect(mMockTestDevice.isAppEnumerationSupported()).andStubReturn(false); in setUp() 79 EasyMock.expect(mMockTestDevice.installPackage((File) EasyMock.anyObject(), in testSetup() 81 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testSetup() 82 mInstallApkSetup.setUp(mMockTestDevice, mMockBuildInfo); in testSetup() 83 EasyMock.verify(mMockBuildInfo, mMockTestDevice); in testSetup() 92 EasyMock.expect(mMockTestDevice.isAppEnumerationSupported()).andReturn(true); in testSetupForceQueryable() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/ |
D | AndroidJUnitTestTest.java | 72 private ITestDevice mMockTestDevice; field in AndroidJUnitTestTest 87 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 88 EasyMock.expect(mMockTestDevice.getIDevice()).andStubReturn(mMockIDevice); in setUp() 89 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("serial"); in setUp() 103 mAndroidJUnitTest.setDevice(mMockTestDevice); in setUp() 131 EasyMock.replay(mMockRemoteRunner, mMockTestDevice); in testRun_includeFilterClass() 134 EasyMock.verify(mMockRemoteRunner, mMockTestDevice); in testRun_includeFilterClass() 143 EasyMock.replay(mMockRemoteRunner, mMockTestDevice); in testRun_excludeFilterClass() 146 EasyMock.verify(mMockRemoteRunner, mMockTestDevice); in testRun_excludeFilterClass() 156 EasyMock.replay(mMockRemoteRunner, mMockTestDevice); in testRun_includeAndExcludeFilterClass() [all …]
|
D | InstrumentationTestTest.java | 112 @Mock ITestDevice mMockTestDevice; field in InstrumentationTestTest 139 doReturn(mMockIDevice).when(mMockTestDevice).getIDevice(); in setUp() 140 doReturn("serial").when(mMockTestDevice).getSerialNumber(); in setUp() 152 mInstrumentationTest.setDevice(mMockTestDevice); in setUp() 183 .when(mMockTestDevice) in testRun() 189 InOrder inOrder = Mockito.inOrder(mInstrumentationTest, mMockTestDevice, mMockListener); in testRun() 193 inOrder.verify(mMockTestDevice, times(2)) in testRun() 219 doReturn(28).when(mMockTestDevice).getApiLevel(); in testRun_hiddenApiCheck() 231 doReturn(true).when(mMockTestDevice).checkApiLevelAgainstNextRelease(30); in testRun_testApiCheck() 244 doReturn(true).when(mMockTestDevice).checkApiLevelAgainstNextRelease(29); in testRun_isolatedStorage() [all …]
|
D | InstrumentationFileTestTest.java | 66 private ITestDevice mMockTestDevice; field in InstrumentationFileTestTest 78 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 81 EasyMock.expect(mMockTestDevice.getIDevice()).andStubReturn(mockIDevice); in setUp() 82 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("serial"); in setUp() 83 EasyMock.expect(mMockTestDevice.checkApiLevelAgainstNextRelease(EasyMock.anyInt())) in setUp() 94 mMockITest.setDevice(mMockTestDevice); in setUp() 153 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_singleSuccessfulTest() 155 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_singleSuccessfulTest() 257 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_reRunOneFailedToCompleteTest() 259 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_reRunOneFailedToCompleteTest() [all …]
|
D | InstalledInstrumentationsTestTest.java | 58 private ITestDevice mMockTestDevice; field in InstalledInstrumentationsTestTest 66 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 67 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("foo"); in setUp() 71 mInstalledInstrTest.setDevice(mMockTestDevice); in setUp() 84 EasyMock.replay(mMockTestDevice, mMockListener); in testRun() 94 EasyMock.verify(mMockListener, mMockTestDevice); in testRun() 113 EasyMock.replay(mMockTestDevice, mMockListener); in testRun_retry() 125 EasyMock.verify(mMockListener, mMockTestDevice); in testRun_retry() 150 EasyMock.replay(mMockTestDevice, mMockListener); in testShardedRun() 152 shard0.setDevice(mMockTestDevice); in testShardedRun() [all …]
|
D | InstrumentationSerialTestTest.java | 51 private ITestDevice mMockTestDevice; field in InstrumentationSerialTestTest 57 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp() 60 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("serial"); in setUp() 86 mockITest.setDevice(mMockTestDevice); in testRun() 103 EasyMock.replay(mMockListener, mMockTestDevice); in testRun() 105 assertEquals(mMockTestDevice, mockITest.getDevice()); in testRun() 108 EasyMock.verify(mMockListener, mMockTestDevice); in testRun() 133 mockITest.setDevice(mMockTestDevice); in testRun_runFailure() 162 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_runFailure() 164 assertEquals(mMockTestDevice, mockITest.getDevice()); in testRun_runFailure() [all …]
|
D | GTestBaseTest.java | 46 @Mock ITestDevice mMockTestDevice; field in GTestBaseTest
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/recovery/ |
D | RunConfigDeviceRecoveryTest.java | 44 private IManagedTestDevice mMockTestDevice; field in RunConfigDeviceRecoveryTest 51 mMockTestDevice = EasyMock.createMock(IManagedTestDevice.class); in setup() 55 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("serial"); in setup() 56 EasyMock.expect(mMockTestDevice.getIDevice()).andStubReturn(mMockIDevice); in setup() 76 devices.add(mMockTestDevice); in testRecoverDevice_allocated() 77 EasyMock.expect(mMockTestDevice.getAllocationState()) in testRecoverDevice_allocated() 87 devices.add(mMockTestDevice); in testRecoverDevice_offline() 88 EasyMock.expect(mMockTestDevice.getAllocationState()) in testRecoverDevice_offline() 103 EasyMock.reset(mMockTestDevice); in testRecoverDevice_fastboot() 104 EasyMock.expect(mMockTestDevice.getIDevice()).andStubReturn(new FastbootDevice("serial")); in testRecoverDevice_fastboot() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | IncidentReportCollectorTest.java | 73 @Mock ITestDevice mMockTestDevice; field in IncidentReportCollectorTest 89 ConfigurationDef.DEFAULT_DEVICE_NAME, mMockTestDevice); in setUp() 128 when(mMockTestDevice.pullFile(Mockito.eq(FAKE_REPORT_PATH.toString()))) in testPullWithIncidentPrefix() 158 verify(mMockTestDevice, never()).pullFile(any(String.class)); in testIgnoreOtherFilesProcessed() 168 when(mMockTestDevice.pullFile(Mockito.eq(FAKE_REPORT_PATH.toString()))) in testIgnoreAndLogFailures() 174 verify(mMockTestDevice).pullFile(FAKE_REPORT_PATH.toString()); in testIgnoreAndLogFailures()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/cluster/ |
D | ClusterCommandLauncherTest.java | 63 private ITestDevice mMockTestDevice; field in ClusterCommandLauncherTest 86 mMockTestDevice = Mockito.mock(ITestDevice.class); in setUp() 87 Mockito.doReturn(DEVICE_SERIAL).when(mMockTestDevice).getSerialNumber(); in setUp() 112 mInvocationContext.addAllocatedDevice("foo", mMockTestDevice); in testRun() 174 mInvocationContext.addAllocatedDevice("foo", mMockTestDevice); in testRun_withSetupScripts() 227 mInvocationContext.addAllocatedDevice("foo", mMockTestDevice); in testRun_withUseSubprocessReporting()
|