|
|
@ -32,6 +32,7 @@ import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.exceptions.InvalidDeviceException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.exceptions.InvalidDeviceException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.Activity;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
|
|
|
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManagementException;
|
|
|
|
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.android.common.exception.AndroidDeviceMgtPluginException;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.android.core.impl.AndroidServiceImpl;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.android.core.impl.AndroidServiceImpl;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.android.core.mokcs.DeviceManagementProviderServiceMock;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.android.core.mokcs.DeviceManagementProviderServiceMock;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.android.core.mokcs.utils.TestUtils;
|
|
|
|
import org.wso2.carbon.device.mgt.mobile.android.core.mokcs.utils.TestUtils;
|
|
|
@ -60,7 +61,7 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testConfigureDeviceLock() throws OperationManagementException {
|
|
|
|
public void testConfigureDeviceLock() throws OperationManagementException, AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.configureDeviceLock(TestUtils.getDeviceLockBeanWrapper());
|
|
|
|
Activity activity = androidService.configureDeviceLock(TestUtils.getDeviceLockBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -69,7 +70,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testConfigureDeviceUnlock()
|
|
|
|
public void testConfigureDeviceUnlock()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.configureDeviceUnlock(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.configureDeviceUnlock(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -78,7 +80,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testGetDeviceLocation()
|
|
|
|
public void testGetDeviceLocation()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.getDeviceLocation(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.getDeviceLocation(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -87,7 +90,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testRemovePassword()
|
|
|
|
public void testRemovePassword()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.removePassword(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.removePassword(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -96,7 +100,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testConfigureCamera()
|
|
|
|
public void testConfigureCamera()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.configureCamera(TestUtils.getCamerabeanWrapper());
|
|
|
|
Activity activity = androidService.configureCamera(TestUtils.getCamerabeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -105,7 +110,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testGetDeviceInformation()
|
|
|
|
public void testGetDeviceInformation()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.getDeviceInformation(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.getDeviceInformation(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -114,7 +120,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testGetDeviceLogcat()
|
|
|
|
public void testGetDeviceLogcat()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.getDeviceLogcat(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.getDeviceLogcat(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -122,8 +129,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testWipeDevice()
|
|
|
|
public void testWipeDevice() throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.wipeDevice(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.wipeDevice(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -131,8 +138,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testWipeData()
|
|
|
|
public void testWipeData() throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.wipeData(TestUtils.getWipeDataBeanWrapper());
|
|
|
|
Activity activity = androidService.wipeData(TestUtils.getWipeDataBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -141,7 +148,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testGetApplications()
|
|
|
|
public void testGetApplications()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.getApplications(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.getApplications(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -149,8 +157,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testRingDevice()
|
|
|
|
public void testRingDevice() throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.ringDevice(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.ringDevice(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -159,7 +167,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testRebootDevice()
|
|
|
|
public void testRebootDevice()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.rebootDevice(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.rebootDevice(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -168,7 +177,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testChangeLockTask()
|
|
|
|
public void testChangeLockTask()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.changeLockTask(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.changeLockTask(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -176,8 +186,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testMuteDevice()
|
|
|
|
public void testMuteDevice() throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.muteDevice(TestUtils.getDeviceIds());
|
|
|
|
Activity activity = androidService.muteDevice(TestUtils.getDeviceIds());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -186,7 +196,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testInstallApplication()
|
|
|
|
public void testInstallApplication()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService
|
|
|
|
Activity activity = androidService
|
|
|
|
.installApplication(TestUtils.getApplicationInstallationBeanWrapper());
|
|
|
|
.installApplication(TestUtils.getApplicationInstallationBeanWrapper());
|
|
|
@ -196,7 +207,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testUpdateApplication()
|
|
|
|
public void testUpdateApplication()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.updateApplication(TestUtils.getApplicationUpdateBeanWrapper());
|
|
|
|
Activity activity = androidService.updateApplication(TestUtils.getApplicationUpdateBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -205,7 +217,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testUninstallApplicationPublic()
|
|
|
|
public void testUninstallApplicationPublic()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService
|
|
|
|
Activity activity = androidService
|
|
|
|
.uninstallApplication(TestUtils.getApplicationUninstallationBeanWrapperPublic());
|
|
|
|
.uninstallApplication(TestUtils.getApplicationUninstallationBeanWrapperPublic());
|
|
|
@ -215,7 +228,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testUninstallApplicationWebApp()
|
|
|
|
public void testUninstallApplicationWebApp()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService
|
|
|
|
Activity activity = androidService
|
|
|
|
.uninstallApplication(TestUtils.getApplicationUninstallationBeanWrapperWebApp());
|
|
|
|
.uninstallApplication(TestUtils.getApplicationUninstallationBeanWrapperWebApp());
|
|
|
@ -225,7 +239,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testBlacklistApplications()
|
|
|
|
public void testBlacklistApplications()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService
|
|
|
|
Activity activity = androidService
|
|
|
|
.blacklistApplications(TestUtils.getBlacklistApplicationsBeanWrapper());
|
|
|
|
.blacklistApplications(TestUtils.getBlacklistApplicationsBeanWrapper());
|
|
|
@ -235,7 +250,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testUpgradeFirmware()
|
|
|
|
public void testUpgradeFirmware()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.upgradeFirmware(TestUtils.getUpgradeFirmwareBeanWrapper());
|
|
|
|
Activity activity = androidService.upgradeFirmware(TestUtils.getUpgradeFirmwareBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -244,7 +260,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testConfigureVPN()
|
|
|
|
public void testConfigureVPN()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.configureVPN(TestUtils.getVpnBeanWrapper());
|
|
|
|
Activity activity = androidService.configureVPN(TestUtils.getVpnBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -253,7 +270,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testSendNotification()
|
|
|
|
public void testSendNotification()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.sendNotification(TestUtils.getNotificationBeanWrapper());
|
|
|
|
Activity activity = androidService.sendNotification(TestUtils.getNotificationBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -262,7 +280,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testConfigureWifi()
|
|
|
|
public void testConfigureWifi()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.configureWifi(TestUtils.getWifiBeanWrapper());
|
|
|
|
Activity activity = androidService.configureWifi(TestUtils.getWifiBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -271,7 +290,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testEncryptStorage()
|
|
|
|
public void testEncryptStorage()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.encryptStorage(TestUtils.getEncryptionBeanWrapper());
|
|
|
|
Activity activity = androidService.encryptStorage(TestUtils.getEncryptionBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -280,7 +300,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testChangeLockCode()
|
|
|
|
public void testChangeLockCode()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.changeLockCode(TestUtils.getLockCodeBeanWrapper());
|
|
|
|
Activity activity = androidService.changeLockCode(TestUtils.getLockCodeBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -289,7 +310,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testSetPasswordPolicy()
|
|
|
|
public void testSetPasswordPolicy()
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.setPasswordPolicy(TestUtils.getPasswordPolicyBeanWrapper());
|
|
|
|
Activity activity = androidService.setPasswordPolicy(TestUtils.getPasswordPolicyBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
@ -297,8 +319,8 @@ public class DeviceManagementAdminServiceTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void testSetWebClip()
|
|
|
|
public void testSetWebClip() throws DeviceManagementException, OperationManagementException, InvalidDeviceException,
|
|
|
|
throws DeviceManagementException, OperationManagementException, InvalidDeviceException {
|
|
|
|
AndroidDeviceMgtPluginException {
|
|
|
|
mockDeviceManagementService();
|
|
|
|
mockDeviceManagementService();
|
|
|
|
Activity activity = androidService.setWebClip(TestUtils.getWebClipBeanWrapper());
|
|
|
|
Activity activity = androidService.setWebClip(TestUtils.getWebClipBeanWrapper());
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|
Assert.assertNotNull(activity);
|
|
|
|