use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROSADsTests method postAsyncRelativeRetryInvalidJsonPolling.
@Test
public void postAsyncRelativeRetryInvalidJsonPolling() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().postAsyncRelativeRetryInvalidJsonPolling(product);
fail();
} catch (RuntimeException ex) {
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 put200InvalidJson.
@Test
public void put200InvalidJson() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().put200InvalidJson(product);
fail();
} catch (RuntimeException ex) {
Assert.assertTrue(ex.getMessage().contains("Unexpected end-of-input"));
}
}
use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROSADsTests method post202NoLocation.
@Test
public void post202NoLocation() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
client.lROSADs().post202NoLocation(product);
fail();
} catch (CloudException ex) {
Assert.assertEquals(202, ex.response().code());
Assert.assertTrue(ex.getMessage().contains("Response does not contain an Azure"));
}
}
use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROsTests method put200Succeeded.
@Test
public void put200Succeeded() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
ProductInner response = client.lROs().put200Succeeded(product);
Assert.assertEquals("Succeeded", response.provisioningState());
}
use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROsTests method deleteProvisioning202DeletingFailed200.
@Test
public void deleteProvisioning202DeletingFailed200() throws Exception {
ProductInner response = client.lROs().deleteProvisioning202DeletingFailed200();
Assert.assertEquals("Failed", response.provisioningState());
}
Aggregations