|
|
@ -90,6 +90,15 @@ public class DeviceTypeManagerTest {
|
|
|
|
if (resourceUrl != null) {
|
|
|
|
if (resourceUrl != null) {
|
|
|
|
androidConfiguration = new File(resourceUrl.getFile());
|
|
|
|
androidConfiguration = new File(resourceUrl.getFile());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
datasourceField = DeviceTypeDAOHandler.class.getDeclaredField("dataSource");
|
|
|
|
|
|
|
|
datasourceField.setAccessible(true);
|
|
|
|
|
|
|
|
currentConnection = DeviceTypeDAOHandler.class.getDeclaredField("currentConnection");
|
|
|
|
|
|
|
|
currentConnection.setAccessible(true);
|
|
|
|
|
|
|
|
deviceTypePluginDAOField = DeviceTypePluginDAOManager.class.getDeclaredField("deviceTypePluginDAO");
|
|
|
|
|
|
|
|
deviceTypePluginDAOField.setAccessible(true);
|
|
|
|
|
|
|
|
deviceTypeDAOHandlerField = DeviceTypePluginDAOManager.class.getDeclaredField("deviceTypeDAOHandler");
|
|
|
|
|
|
|
|
deviceTypeDAOHandlerField.setAccessible(true);
|
|
|
|
|
|
|
|
|
|
|
|
DeviceTypeConfiguration androidDeviceConfiguration = Utils.getDeviceTypeConfiguration(androidConfiguration);
|
|
|
|
DeviceTypeConfiguration androidDeviceConfiguration = Utils.getDeviceTypeConfiguration(androidConfiguration);
|
|
|
|
androidDeviceTypeManager = Mockito.mock(DeviceTypeManager.class, Mockito.CALLS_REAL_METHODS);
|
|
|
|
androidDeviceTypeManager = Mockito.mock(DeviceTypeManager.class, Mockito.CALLS_REAL_METHODS);
|
|
|
|
customDeviceTypeManager = Mockito.mock(DeviceTypeManager.class, Mockito.CALLS_REAL_METHODS);
|
|
|
|
customDeviceTypeManager = Mockito.mock(DeviceTypeManager.class, Mockito.CALLS_REAL_METHODS);
|
|
|
@ -108,15 +117,6 @@ public class DeviceTypeManagerTest {
|
|
|
|
Field deviceType = DeviceTypeManager.class.getDeclaredField("deviceType");
|
|
|
|
Field deviceType = DeviceTypeManager.class.getDeclaredField("deviceType");
|
|
|
|
deviceType.setAccessible(true);
|
|
|
|
deviceType.setAccessible(true);
|
|
|
|
|
|
|
|
|
|
|
|
datasourceField = DeviceTypeDAOHandler.class.getDeclaredField("dataSource");
|
|
|
|
|
|
|
|
datasourceField.setAccessible(true);
|
|
|
|
|
|
|
|
currentConnection = DeviceTypeDAOHandler.class.getDeclaredField("currentConnection");
|
|
|
|
|
|
|
|
currentConnection.setAccessible(true);
|
|
|
|
|
|
|
|
deviceTypePluginDAOField = DeviceTypePluginDAOManager.class.getDeclaredField("deviceTypePluginDAO");
|
|
|
|
|
|
|
|
deviceTypePluginDAOField.setAccessible(true);
|
|
|
|
|
|
|
|
deviceTypeDAOHandlerField = DeviceTypePluginDAOManager.class.getDeclaredField("deviceTypeDAOHandler");
|
|
|
|
|
|
|
|
deviceTypeDAOHandlerField.setAccessible(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deviceType.set(androidDeviceTypeManager, androidDeviceType);
|
|
|
|
deviceType.set(androidDeviceTypeManager, androidDeviceType);
|
|
|
|
propertiesExist.set(androidDeviceTypeManager, true);
|
|
|
|
propertiesExist.set(androidDeviceTypeManager, true);
|
|
|
|
createAndroidDevice();
|
|
|
|
createAndroidDevice();
|
|
|
|