List of usage examples for org.apache.commons.httpclient HttpStatus SC_CREATED
int SC_CREATED
To view the source code for org.apache.commons.httpclient HttpStatus SC_CREATED.
Click Source Link
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android device camera operation.") public void testCamera() throws Exception { JsonObject operationData = PayloadGenerator.getJsonPayload( Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME, Constants.AndroidOperations.CAMERA_OPERATION); JsonArray deviceIds = new JsonArray(); JsonPrimitive deviceID = new JsonPrimitive(Constants.DEVICE_ID); deviceIds.add(deviceID);// ww w . jav a2 s .co m operationData.add(Constants.DEVICE_IDENTIFIERS_KEY, deviceIds); HttpResponse response = client.post(Constants.AndroidOperations.CAMERA_ENDPOINT, operationData.toString()); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android device information operation.") public void testDeviceInfo() throws Exception { HttpResponse response = client.post(Constants.AndroidOperations.DEVICE_INFO_ENDPOINT, Constants.AndroidOperations.COMMAND_OPERATION_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android enterprise-wipe operation.") public void testEnterpriseWipe() throws Exception { HttpResponse response = client.post(Constants.AndroidOperations.ENTERPRISE_WIPE_ENDPOINT, Constants.AndroidOperations.COMMAND_OPERATION_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android wipe data operation.") public void testWipeData() throws Exception { JsonObject operationData = PayloadGenerator.getJsonPayload( Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME, Constants.AndroidOperations.WIPE_DATA_OPERATION); JsonArray deviceIds = new JsonArray(); JsonPrimitive deviceID = new JsonPrimitive(Constants.DEVICE_ID); deviceIds.add(deviceID);//from w w w . java 2s . co m operationData.add(Constants.DEVICE_IDENTIFIERS_KEY, deviceIds); HttpResponse response = client.post(Constants.AndroidOperations.WIPE_DATA_ENDPOINT, operationData.toString()); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android application list operation.") public void testApplicationList() throws Exception { HttpResponse response = client.post(Constants.AndroidOperations.APPLICATION_LIST_ENDPOINT, Constants.AndroidOperations.COMMAND_OPERATION_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android ring operation.") public void testRing() throws Exception { HttpResponse response = client.post(Constants.AndroidOperations.RING_ENDPOINT, Constants.AndroidOperations.COMMAND_OPERATION_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android mute operation.") public void testMute() throws Exception { HttpResponse response = client.post(Constants.AndroidOperations.MUTE_ENDPOINT, Constants.AndroidOperations.COMMAND_OPERATION_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, 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);/*w ww . j a v a2 s . c o m*/ operationData.add(Constants.DEVICE_IDENTIFIERS_KEY, deviceIds); HttpResponse response = client.post(Constants.AndroidOperations.INSTALL_APPS_ENDPOINT, operationData.toString()); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android uninstall apps operation.") public void testUninstallApps() 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);//from w w w . j a v a 2 s.co m operationData.add(Constants.DEVICE_IDENTIFIERS_KEY, deviceIds); HttpResponse response = client.post(Constants.AndroidOperations.UNINSTALL_APPS_ENDPOINT, operationData.toString()); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.mdm.integration.device.operation.AndroidOperation.java
@Test(groups = Constants.AndroidOperations.OPERATIONS_GROUP, description = "Test Android blacklist apps operation.") public void testBlacklistApps() 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);//from w w w . ja v a 2 s . c o m operationData.add(Constants.DEVICE_IDENTIFIERS_KEY, deviceIds); HttpResponse response = client.post(Constants.AndroidOperations.BLACKLIST_APPS_ENDPOINT, operationData.toString()); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }