Search in sources :

Example 21 with ProductInner

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

the class LROsCustomHeaderTests method postAsyncRetrySucceeded.

@Ignore("Pending headermap")
public void postAsyncRetrySucceeded() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    client.lROsCustomHeaders().postAsyncRetrySucceeded(product);
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) Ignore(org.junit.Ignore)

Example 22 with ProductInner

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

the class LROSADsTests method putAsyncRelativeRetryInvalidHeader.

@Test
public void putAsyncRelativeRetryInvalidHeader() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    try {
        client.lROSADs().putAsyncRelativeRetryInvalidHeader(product);
        fail();
    } catch (NumberFormatException ex) {
        Assert.assertEquals("For input string: \"/bar\"", ex.getMessage());
    }
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) Test(org.junit.Test)

Example 23 with ProductInner

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

the class LROSADsTests method postAsyncRelativeRetryInvalidHeader.

@Test
public void postAsyncRelativeRetryInvalidHeader() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    try {
        client.lROSADs().postAsyncRelativeRetryInvalidHeader(product);
        fail();
    } catch (NumberFormatException ex) {
        Assert.assertEquals("For input string: \"/bar\"", ex.getMessage());
    }
}
Also used : ProductInner(fixtures.lro.implementation.ProductInner) Test(org.junit.Test)

Example 24 with ProductInner

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

the class LROSADsTests method post202NonRetry400.

@Test
public void post202NonRetry400() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    try {
        client.lROSADs().post202NonRetry400(product);
        fail();
    } catch (CloudException ex) {
        Assert.assertEquals(400, ex.response().code());
    }
}
Also used : CloudException(com.microsoft.azure.CloudException) ProductInner(fixtures.lro.implementation.ProductInner) Test(org.junit.Test)

Example 25 with ProductInner

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

the class LROSADsTests method putAsyncRelativeRetry400.

@Test
public void putAsyncRelativeRetry400() throws Exception {
    ProductInner product = new ProductInner();
    product.withLocation("West US");
    try {
        client.lROSADs().putAsyncRelativeRetry400(product);
        fail();
    } catch (CloudException ex) {
        Assert.assertEquals(400, ex.response().code());
    }
}
Also used : CloudException(com.microsoft.azure.CloudException) 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