public void CloudQueueClientWithToken() { TokenCredential token = new TokenCredential(TestBase.GenerateOAuthToken()); StorageCredentials credentials = new StorageCredentials(token); Uri baseAddressUri = new Uri(TestBase.TargetTenantConfig.QueueServiceEndpoint); CloudQueueClient client = new CloudQueueClient(baseAddressUri, credentials); CloudQueue queue = client.GetQueueReference("queue"); queue.Exists(); }
public void CloudQueueClientCreateQueueSharedKeyLite() { DelegatingHandlerImpl delegatingHandlerImpl = new DelegatingHandlerImpl(new DelegatingHandlerImpl()); CloudQueueClient queueClient = GenerateCloudQueueClient(delegatingHandlerImpl); queueClient.AuthenticationScheme = AuthenticationScheme.SharedKeyLite; string queueName = Guid.NewGuid().ToString("N"); CloudQueue queue = queueClient.GetQueueReference(queueName); queue.Create(); bool exists = queue.Exists(); Assert.IsTrue(exists); Assert.AreNotEqual(0, delegatingHandlerImpl.CallCount); }