Home
last modified time | relevance | path

Searched refs:mMockTestDevice (Results 1 – 11 of 11) sorted by relevance

/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DInstallAllTestZipAppsSetupTest.java47 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()
105 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testGetZipFile()
106 File ret = mPrep.getZipFile(mMockTestDevice, mMockBuildInfo); in testGetZipFile()
116 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testGetZipFileDoesntExist()
117 File ret = mPrep.getZipFile(mMockTestDevice, mMockBuildInfo); in testGetZipFileDoesntExist()
124 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testNullTestZipName()
126 mPrep.setUp(mMockTestDevice, mMockBuildInfo); in testNullTestZipName()
[all …]
DTestAppInstallSetupTest.java50 private ITestDevice mMockTestDevice; field in TestAppInstallSetupTest
89 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp()
90 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp()
91 EasyMock.expect(mMockTestDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
103 mMockTestDevice.installPackage( in testSetupAndTeardown()
106 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testSetupAndTeardown()
107 mPrep.setUp(mMockTestDevice, mMockBuildInfo); in testSetupAndTeardown()
108 EasyMock.verify(mMockBuildInfo, mMockTestDevice); in testSetupAndTeardown()
116 mMockTestDevice.installPackage( in testSetup_instantMode()
121 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testSetup_instantMode()
[all …]
DInstallApkSetupTest.java45 private ITestDevice mMockTestDevice; field in InstallApkSetupTest
55 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp()
56 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn(SERIAL); in setUp()
57 EasyMock.expect(mMockTestDevice.getDeviceDescriptor()).andStubReturn(null); in setUp()
77 EasyMock.expect(mMockTestDevice.installPackage((File) EasyMock.anyObject(), in testSetup()
79 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testSetup()
80 mInstallApkSetup.setUp(mMockTestDevice, mMockBuildInfo); in testSetup()
81 EasyMock.verify(mMockBuildInfo, mMockTestDevice); in testSetup()
92 EasyMock.replay(mMockBuildInfo, mMockTestDevice); in testNonExistingApk()
94 mInstallApkSetup.setUp(mMockTestDevice, mMockBuildInfo); in testNonExistingApk()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DAndroidJUnitTestTest.java54 private ITestDevice mMockTestDevice; field in AndroidJUnitTestTest
63 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp()
64 EasyMock.expect(mMockTestDevice.getIDevice()).andStubReturn(mMockIDevice); in setUp()
65 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("serial"); in setUp()
77 mAndroidJUnitTest.setDevice(mMockTestDevice); in setUp()
98 EasyMock.replay(mMockRemoteRunner, mMockTestDevice); in testRun_includeFilterClass()
101 EasyMock.verify(mMockRemoteRunner, mMockTestDevice); in testRun_includeFilterClass()
111 EasyMock.replay(mMockRemoteRunner, mMockTestDevice); in testRun_excludeFilterClass()
114 EasyMock.verify(mMockRemoteRunner, mMockTestDevice); in testRun_excludeFilterClass()
125 EasyMock.replay(mMockRemoteRunner, mMockTestDevice); in testRun_includeAndExcludeFilterClass()
[all …]
DInstalledInstrumentationsTestTest.java44 private ITestDevice mMockTestDevice; field in InstalledInstrumentationsTestTest
56 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp()
57 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("foo"); in setUp()
61 mInstalledInstrTest.setDevice(mMockTestDevice); in setUp()
77 EasyMock.replay(mMockTestDevice, mMockListener); in testRun()
94 EasyMock.verify(mMockListener, mMockTestDevice); in testRun()
120 EasyMock.replay(mMockTestDevice, mMockListener); in testShardedRun()
122 shard0.setDevice(mMockTestDevice); in testShardedRun()
126 shard1.setDevice(mMockTestDevice); in testShardedRun()
149 EasyMock.verify(mMockListener, mMockTestDevice); in testShardedRun()
[all …]
DInstrumentationSerialTestTest.java46 private ITestDevice mMockTestDevice; field in InstrumentationSerialTestTest
51 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp()
54 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("serial"); in setUp()
76 mockITest.setDevice(mMockTestDevice); in testRun()
93 EasyMock.replay(mMockListener, mMockTestDevice); in testRun()
95 assertEquals(mMockTestDevice, mockITest.getDevice()); in testRun()
98 EasyMock.verify(mMockListener, mMockTestDevice); in testRun()
122 mockITest.setDevice(mMockTestDevice); in testRun_runFailure()
147 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_runFailure()
149 assertEquals(mMockTestDevice, mockITest.getDevice()); in testRun_runFailure()
[all …]
DVersionedTfLauncherTest.java72 private ITestDevice mMockTestDevice; field in VersionedTfLauncherTest
82 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp()
140 deviceInfos.put(mMockTestDevice, null); in testRun_singleDevice()
146 EasyMock.expect(mMockTestDevice.getIDevice()).andReturn(mMockIDevice).times(2); in testRun_singleDevice()
147 EasyMock.expect(mMockTestDevice.getSerialNumber()).andReturn(FAKE_SERIAL).times(1); in testRun_singleDevice()
158 EasyMock.replay(mMockTestDevice, mMockBuildInfo, mMockRunUtil, mMockListener, mMockConfig); in testRun_singleDevice()
160 EasyMock.verify(mMockTestDevice, mMockBuildInfo, mMockRunUtil, mMockListener, mMockConfig); in testRun_singleDevice()
197 deviceInfos.put(mMockTestDevice, null); in testRun_nullDevice()
202 EasyMock.expect(mMockTestDevice.getIDevice()).andReturn(mMockIDevice).times(1); in testRun_nullDevice()
213 EasyMock.replay(mMockTestDevice, mMockBuildInfo, mMockRunUtil, mMockListener, mMockConfig); in testRun_nullDevice()
[all …]
DInstrumentationFileTestTest.java55 private ITestDevice mMockTestDevice; field in InstrumentationFileTestTest
68 mMockTestDevice = EasyMock.createMock(ITestDevice.class); in setUp()
71 EasyMock.expect(mMockTestDevice.getIDevice()).andStubReturn(mockIDevice); in setUp()
72 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubReturn("serial"); in setUp()
81 mMockITest.setDevice(mMockTestDevice); in setUp()
136 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_singleSuccessfulTest()
138 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_singleSuccessfulTest()
236 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_reRunOneFailedToCompleteTest()
238 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_reRunOneFailedToCompleteTest()
343 EasyMock.replay(mMockListener, mMockTestDevice); in testRun_serialReRunOfTwoFailedToCompleteTests()
[all …]
DInstrumentationTestTest.java83 @Mock ITestDevice mMockTestDevice; field in InstrumentationTestTest
110 doReturn(mMockIDevice).when(mMockTestDevice).getIDevice(); in setUp()
111 doReturn("serial").when(mMockTestDevice).getSerialNumber(); in setUp()
123 mInstrumentationTest.setDevice(mMockTestDevice); in setUp()
143 .when(mMockTestDevice) in testRun()
149 InOrder inOrder = Mockito.inOrder(mInstrumentationTest, mMockTestDevice, mMockListener); in testRun()
153 inOrder.verify(mMockTestDevice, times(2)) in testRun()
179 doReturn(28).when(mMockTestDevice).getApiLevel(); in testRun_hiddenApiCheck()
265 .when(mMockTestDevice) in testRun_rerunEmpty()
317 .when(mMockTestDevice) in testRun_rerun()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DDeviceManagerTest.java63 private IManagedTestDevice mMockTestDevice; field in DeviceManagerTest
169 mMockTestDevice = EasyMock.createMock(IManagedTestDevice.class); in setUp()
173 mMockTestDevice.setIDevice(idevice); in setUp()
174 return mMockTestDevice; in setUp()
195 EasyMock.expect(mMockTestDevice.getMacAddress()).andStubReturn(MAC_ADDRESS); in setUp()
196 EasyMock.expect(mMockTestDevice.getSimState()).andStubReturn(SIM_STATE); in setUp()
197 EasyMock.expect(mMockTestDevice.getSimOperator()).andStubReturn(SIM_OPERATOR); in setUp()
199 mMockTestDevice.setIDevice(EasyMock.capture(capturedIDevice)); in setUp()
201 EasyMock.expect(mMockTestDevice.getIDevice()).andStubAnswer(new IAnswer<IDevice>() { in setUp()
207 EasyMock.expect(mMockTestDevice.getSerialNumber()).andStubAnswer(new IAnswer<String>() { in setUp()
[all …]
DBackgroundDeviceActionTest.java41 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 …]