use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROSADsTests method post202RetryInvalidHeader.
@Test
public void post202RetryInvalidHeader() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().post202RetryInvalidHeader(product);
fail();
} catch (NumberFormatException ex) {
Assert.assertEquals("For input string: \"/bar\"", ex.getMessage());
}
}
use of fixtures.lro.implementation.ProductInner 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 fixtures.lro.implementation.ProductInner 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 fixtures.lro.implementation.ProductInner 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 fixtures.lro.implementation.ProductInner 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