예제 #1
0
 @Test(description = "Test get license.")
 public void testGetLicense() throws Exception {
   HttpResponse response = client.get(Constants.LicenseManagement.GET_LICENSE_ENDPOINT);
   Assert.assertEquals(HttpStatus.SC_OK, response.getResponseCode());
   Assert.assertTrue(
       response.getData().contains(Constants.LicenseManagement.LICENSE_RESPONSE_PAYLOAD));
 }
 @Test(
     dependsOnMethods = {"testEnrollment"},
     description = "Test Android install apps operation.")
 public void testInstallApps() throws Exception {
   JsonObject operationData =
       PayloadGenerator.getJsonPayload(
           Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME,
           Constants.AndroidOperations.INSTALL_APPS_OPERATION);
   JsonArray deviceIds = new JsonArray();
   JsonPrimitive deviceID = new JsonPrimitive(Constants.DEVICE_ID);
   deviceIds.add(deviceID);
   operationData.add(Constants.DEVICE_IDENTIFIERS_KEY, deviceIds);
   HttpResponse response =
       rclient.post(Constants.AndroidOperations.INSTALL_APPS_ENDPOINT, operationData.toString());
   Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode());
 }