Search in sources :

Example 11 with ProductInner

use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.

the class LROsTests method put202Retry200.

@Test
public void put202Retry200() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    ProductInner response = client.lROs().put202Retry200(product);
    Assert.assertEquals("100", response.id());
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) SubProductInner(fixtures.lro.implementation.SubProductInner) Test(org.junit.Test)

Example 12 with ProductInner

use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.

the class LROsTests method postAsyncNoRetrySucceeded.

@Test
public void postAsyncNoRetrySucceeded() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    ProductInner response = client.lROs().postAsyncNoRetrySucceeded(product);
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) SubProductInner(fixtures.lro.implementation.SubProductInner) Test(org.junit.Test)

Example 13 with ProductInner

use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.

the class LROsTests method deleteProvisioning202Accepted200Succeeded.

@Test
public void deleteProvisioning202Accepted200Succeeded() throws Exception {
    ProductInner response = client.lROs().deleteProvisioning202Accepted200Succeeded();
    Assert.assertEquals("Succeeded", response.provisioningState());
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) SubProductInner(fixtures.lro.implementation.SubProductInner) Test(org.junit.Test)

Example 14 with ProductInner

use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.

the class LROsTests method postAsyncRetrycanceled.

@Test
public void postAsyncRetrycanceled() throws Exception {
    try {
        ProductInner product = new ProductInner();
        product.withLocation("West US");
        client.lROs().postAsyncRetrycanceled(product);
        fail();
    } catch (CloudException e) {
        Assert.assertEquals("Async operation failed with provisioning state: Canceled", e.getMessage());
    }
}
Also used : CloudException(com.microsoft.azure.CloudException) ProductInner(fixtures.lro.implementation.ProductInner) SubProductInner(fixtures.lro.implementation.SubProductInner) Test(org.junit.Test)

Example 15 with ProductInner

use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.

the class LROsTests method putNoHeaderInRetry.

@Test
public void putNoHeaderInRetry() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    ProductInner response = client.lROs().putNoHeaderInRetry(product);
    Assert.assertEquals("Succeeded", response.provisioningState());
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) SubProductInner(fixtures.lro.implementation.SubProductInner) Test(org.junit.Test)

Aggregations

ProductInner (fixtures.lro.implementation.ProductInner)51 Test (org.junit.Test)46 SubProductInner (fixtures.lro.implementation.SubProductInner)25 CloudException (com.microsoft.azure.CloudException)17 Ignore (org.junit.Ignore)5 CountDownLatch (java.util.concurrent.CountDownLatch)1