use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROsTests method putAsyncRetryFailed.
@Test
public void putAsyncRetryFailed() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
ProductInner response = client.lROs().putAsyncRetryFailed(product);
fail();
} catch (CloudException e) {
Assert.assertEquals("Async operation failed with provisioning state: Failed", e.getMessage());
}
}
use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROsTests method postAsyncRetrySucceeded.
@Test
public void postAsyncRetrySucceeded() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
ProductInner response = client.lROs().postAsyncRetrySucceeded(product);
}
use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROsTests method put200SucceededAsync.
@Test
public void put200SucceededAsync() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
Observable.from(client.lROs().put200SucceededAsync(product, null)).subscribe(new Subscriber<ProductInner>() {
@Override
public void onCompleted() {
System.out.println("completed");
}
@Override
public void onError(Throwable e) {
System.out.println("error" + e);
}
@Override
public void onNext(ProductInner productInnerServiceResponse) {
System.out.println(productInnerServiceResponse.provisioningState());
}
});
System.out.println("Checkpoint");
}
use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LROsTests method put201CreatingFailed200.
@Test
public void put201CreatingFailed200() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
try {
ProductInner response = client.lROs().put201CreatingFailed200(product);
fail();
} catch (CloudException e) {
Assert.assertEquals("Async operation failed with provisioning state: Failed", e.getMessage());
}
}
use of fixtures.lro.implementation.ProductInner in project autorest.java by Azure.
the class LRORetrysTests method putAsyncRelativeRetrySucceeded.
@Test
public void putAsyncRelativeRetrySucceeded() throws Exception {
ProductInner product = new ProductInner();
product.withLocation("West US");
ProductInner response = client.lRORetrys().putAsyncRelativeRetrySucceeded(product);
Assert.assertEquals("Succeeded", response.provisioningState());
}
Aggregations