Home
last modified time | relevance | path

Searched refs:mMockDeviceManager (Results 1 – 6 of 6) sorted by relevance

/tools/tradefederation/core/javatests/com/android/tradefed/service/management/
DDeviceManagementGrpcServerTest.java67 @Mock private IDeviceManager mMockDeviceManager; field in DeviceManagementGrpcServerTest
79 mServer = new DeviceManagementGrpcServer(server, mMockDeviceManager, mMockCommandScheduler); in setUp()
89 when(mMockDeviceManager.listAllDevices(true)).thenReturn(descriptors); in testGetDevicesStatus()
116 when(mMockDeviceManager.getDeviceDescriptor("serial2")) in testGetDevicesStatus_filter()
133 when(mMockDeviceManager.getDeviceDescriptor("serial1")) in testReserveAndRelease_freeDevice()
138 when(mMockDeviceManager.allocateDevice(Mockito.any())).thenReturn(mockedDevice); in testReserveAndRelease_freeDevice()
172 verify(mMockDeviceManager).freeDevice(mockedDevice, FreeDeviceState.AVAILABLE); in testReserveAndRelease_freeDevice()
181 when(mMockDeviceManager.getDeviceDescriptor("serial1")) in testReserveAndRelease_notFreeDevice()
186 when(mMockDeviceManager.allocateDevice(Mockito.any())).thenReturn(mockedDevice); in testReserveAndRelease_notFreeDevice()
204 verify(mMockDeviceManager, never()).freeDevice(mockedDevice, FreeDeviceState.AVAILABLE); in testReserveAndRelease_notFreeDevice()
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/device/
DManagedTestDeviceFactoryTest.java39 @Mock IDeviceManager mMockDeviceManager; field in ManagedTestDeviceFactoryTest
48 mFactory = new ManagedTestDeviceFactory(true, mMockDeviceManager, mMockDeviceMonitor) ; in setUp()
83 when(mMockDeviceManager.isFileSystemMountCheckEnabled()).thenReturn(false); in testNestedDevice()
84 when(mMockDeviceManager.getFastbootPath()).thenReturn("fastboot"); in testNestedDevice()
86 new ManagedTestDeviceFactory(true, mMockDeviceManager, mMockDeviceMonitor) { in testNestedDevice()
/tools/tradefederation/core/javatests/com/android/tradefed/device/recovery/
DRunConfigDeviceRecoveryTest.java49 private IDeviceManager mMockDeviceManager; field in RunConfigDeviceRecoveryTest
56 mMockDeviceManager = mock(IDeviceManager.class); in setup()
64 return mMockDeviceManager; in setup()
90 when(mMockDeviceManager.forceAllocateDevice("serial")).thenReturn(device); in testRecoverDevice_offline()
107 when(mMockDeviceManager.forceAllocateDevice("serial")).thenReturn(device); in testRecoverDevice_fastboot()
121 when(mMockDeviceManager.forceAllocateDevice("serial")).thenReturn(device); in testRecoverDevice_run()
/tools/tradefederation/core/javatests/com/android/tradefed/command/
DCommandRunnerTest.java63 private IDeviceManager mMockDeviceManager; field in CommandRunnerTest
72 mMockDeviceManager = Mockito.mock(IDeviceManager.class, Answers.RETURNS_SMART_NULLS); in setUp()
85 return mMockDeviceManager; in setUp()
102 return mMockDeviceManager.getAdbVersion(); in setUp()
157 when(mMockDeviceManager.allocateDevice(Mockito.any(), Mockito.eq(false))) in mockDeviceManager()
163 when(mMockDeviceManager.getAdbVersion()).thenReturn("Version 31.0.2-7263705"); in mockDeviceManager()
DCommandSchedulerFuncTest.java77 private MockDeviceManager mMockDeviceManager; field in CommandSchedulerFuncTest
111 mMockDeviceManager = new MockDeviceManager(1); in setUp()
149 return mMockDeviceManager; in setUp()
302 mMockDeviceManager.clearAllDevices(); in testBatteryLowLevel()
303 mMockDeviceManager.addDevice(mockDevice); in testBatteryLowLevel()
342 mMockDeviceManager.clearAllDevices(); in testBatteryLowLevel_interruptible()
343 mMockDeviceManager.addDevice(mockDevice); in testBatteryLowLevel_interruptible()
424 return mMockDeviceManager; in testShutdown_notInterruptible()
552 return mMockDeviceManager; in testShutdown_notInterruptible_timeout()
627 return mMockDeviceManager; in testShutdown_invocation_timeout()
/tools/tradefederation/core/javatests/com/android/tradefed/cluster/
DClusterCommandSchedulerTest.java163 @Mock IDeviceManager mMockDeviceManager; field in ClusterCommandSchedulerTest
242 return mMockDeviceManager; in setUp()
327 when(mMockDeviceManager.listAllDevices()).thenReturn(deviceList);
330 mScheduler.getDevices(mMockDeviceManager, false);
349 when(mMockDeviceManager.listAllDevices()).thenReturn(deviceList);
352 mScheduler.getDevices(mMockDeviceManager, true);
374 when(mMockDeviceManager.listAllDevices()).thenReturn(deviceList);
377 mScheduler.getDevices(mMockDeviceManager, true);
391 when(mMockDeviceManager.listAllDevices()).thenReturn(deviceList);
394 mScheduler.getDevices(mMockDeviceManager, true);