public async Task CloudQueueClientGetServiceStatsAsync() { AssertSecondaryEndpoint(); CloudQueueClient client = GenerateCloudQueueClient(); client.DefaultRequestOptions.LocationMode = LocationMode.SecondaryOnly; TestHelper.VerifyServiceStats(await client.GetServiceStatsAsync()); }
public async Task CloudQueueClientGetServiceStatsInvalidLocAsync() { CloudQueueClient client = GenerateCloudQueueClient(); client.DefaultRequestOptions.LocationMode = LocationMode.PrimaryOnly; try { TestHelper.VerifyServiceStats(await client.GetServiceStatsAsync()); Assert.Fail("GetServiceStats should fail and throw an InvalidOperationException."); } catch (Exception e) { Assert.IsInstanceOfType(e, typeof(InvalidOperationException)); } }