Search in sources :

Example 16 with ProductInner

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

the class LROsTests method putAsyncRetrySucceeded.

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

Example 17 with ProductInner

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

the class LROsTests method put201CreatingSucceeded200.

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

Example 18 with ProductInner

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

the class LROsTests method putAsyncNoRetrycanceled.

@Test
public void putAsyncNoRetrycanceled() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    try {
        ProductInner response = client.lROs().putAsyncNoRetrycanceled(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 19 with ProductInner

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

the class LROsTests method postAsyncRetryFailed.

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

Example 20 with ProductInner

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

the class LRORetrysTests method deleteProvisioning202Accepted200Succeeded.

@Test
public void deleteProvisioning202Accepted200Succeeded() throws Exception {
    ProductInner response = client.lRORetrys().deleteProvisioning202Accepted200Succeeded();
    Assert.assertEquals("Succeeded", response.provisioningState());
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) 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