use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROSADsTests method putNonRetry201Creating400.
@Test
public void putNonRetry201Creating400() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().putNonRetry201Creating400(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 putNonRetry400.
@Test
public void putNonRetry400() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().putNonRetry400(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 putAsyncRelativeRetryNoStatusPayload.
@Test
public void putAsyncRelativeRetryNoStatusPayload() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().putAsyncRelativeRetryNoStatusPayload(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 postNonRetry400.
@Test
public void postNonRetry400() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().postNonRetry400(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 putAsyncRelativeRetryInvalidJsonPolling.
@Test
public void putAsyncRelativeRetryInvalidJsonPolling() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().putAsyncRelativeRetryInvalidJsonPolling(product);
fail();
} catch (RuntimeException ex) {
Assert.assertTrue(ex.getMessage().contains("does not contain a valid body"));
}
}
Aggregations