use of com.microsoft.azure.CloudException in project autorest.java by Azure.
the class LROSADsTests method putAsyncRelativeRetry400.
@Test
public void putAsyncRelativeRetry400() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().putAsyncRelativeRetry400(product);
fail();
} catch (CloudException ex) {
Assert.assertEquals(400, ex.response().code());
}
}
use of com.microsoft.azure.CloudException in project autorest.java by Azure.
the class LROSADsTests method putAsyncRelativeRetryNoStatus.
@Test
public void putAsyncRelativeRetryNoStatus() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().putAsyncRelativeRetryNoStatus(product);
fail();
} catch (CloudException ex) {
Assert.assertEquals(200, ex.response().code());
Assert.assertTrue(ex.getMessage().contains("does not contain a valid body"));
}
}
use of com.microsoft.azure.CloudException in project autorest.java by Azure.
the class LROSADsTests method postAsyncRelativeRetry400.
@Test
public void postAsyncRelativeRetry400() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().postAsyncRelativeRetry400(product);
fail();
} catch (CloudException ex) {
Assert.assertEquals(400, ex.response().code());
}
}
use of com.microsoft.azure.CloudException in project autorest.java by Azure.
the class LROSADsTests method putError201NoProvisioningStatePayload.
@Test
public void putError201NoProvisioningStatePayload() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().putError201NoProvisioningStatePayload(product);
fail();
} catch (CloudException ex) {
Assert.assertEquals(200, ex.response().code());
Assert.assertTrue(ex.getMessage().contains("does not contain a valid body"));
}
}
use of com.microsoft.azure.CloudException in project autorest.java by Azure.
the class LROSADsTests method postAsyncRelativeRetryNoPayload.
@Test
public void postAsyncRelativeRetryNoPayload() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().postAsyncRelativeRetryNoPayload(product);
fail();
} catch (CloudException ex) {
Assert.assertEquals(200, ex.response().code());
Assert.assertTrue(ex.getMessage().contains("does not contain a valid body"));
}
}
Aggregations