Search in sources :

Example 36 with ProductInner

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

the class LROsTests method post202NoRetry204.

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

Example 37 with ProductInner

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

the class LROsTests method deleteProvisioning202Deletingcanceled200.

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

Example 38 with ProductInner

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

the class LROsTests method putAsyncNoHeaderInRetry.

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

Example 39 with ProductInner

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

the class LROsTests method put200UpdatingSucceeded204.

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

Example 40 with ProductInner

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

the class LROsTests method put200Acceptedcanceled200.

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

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