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.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test upgrade firmware operation") public void testUpgradeFirmware() throws FileNotFoundException, MalformedURLException, AutomationFrameworkException { JsonObject upgradeFirmWarePayload = PayloadGenerator.getJsonPayload( Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME, Constants.AndroidOperations.UPGRADE_FIRMWARE_OPERATION); HttpResponse response = client.post(Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.UPGRADE_FIRMWARE_ENDPOINT, upgradeFirmWarePayload.toString()); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test configure VPN operation") public void testConfigureVPN() throws FileNotFoundException, MalformedURLException, AutomationFrameworkException { JsonObject configureVPNPayload = PayloadGenerator.getJsonPayload( Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME, Constants.AndroidOperations.VPN_OPERATION); HttpResponse response = client.post( Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.VPN_ENDPOINT, configureVPNPayload.toString()); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android reboot operation") public void testReboot() throws Exception { HttpResponse response = client.post( Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.REBOOT_ENDPOINT, Constants.AndroidOperations.PAYLOAD_COMMON); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.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.OPERATION_ENDPOINT + Constants.AndroidOperations.RING_ENDPOINT, Constants.AndroidOperations.RING_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.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.OPERATION_ENDPOINT + Constants.AndroidOperations.MUTE_ENDPOINT, Constants.AndroidOperations.MUTE_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android notification operation.") public void testNotification() throws Exception { HttpResponse response = client.post( Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.NOTIFICATION_ENDPOINT, Constants.AndroidOperations.NOTIFICATION_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android WiFi operation.") public void testWiFi() throws Exception { HttpResponse response = client.post( Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.WIFI_ENDPOINT, Constants.AndroidOperations.WIFI_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android encrypt operation.") public void testEncrypt() throws Exception { HttpResponse response = client.post( Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.ENCRYPT_ENDPOINT, Constants.AndroidOperations.ENCRYPT_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android change lock operation.") public void testChangeLock() throws Exception { HttpResponse response = client.post( Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.CHANGE_LOCK_ENDPOINT, Constants.AndroidOperations.CHANGE_LOCK_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }
From source file:org.wso2.iot.integration.device.operation.AndroidOperation.java
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android password policy operation.") public void testPasswordPolicy() throws Exception { HttpResponse response = client.post( Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.PASSWORD_POLICY_ENDPOINT, Constants.AndroidOperations.PASSWORD_POLICY_PAYLOAD); Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode()); }