예제 #1
0
        public async Task CloudQueueClientGetServiceStatsAsync()
        {
            AssertSecondaryEndpoint();

            CloudQueueClient client = GenerateCloudQueueClient();

            client.DefaultRequestOptions.LocationMode = LocationMode.SecondaryOnly;
            TestHelper.VerifyServiceStats(await client.GetServiceStatsAsync());
        }
예제 #2
0
        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));
            }
        }