public async Task GetQueueMetadataAsync_NonexistentQueue_ThrowsQueueDoesNotExistException() { IQueueServiceClient client = new QueueServiceClient(_accountSettings); var queueName = GenerateSampleQueueName(); var response = await client.GetQueueMetadataAsync(queueName); // expects exception }
public async Task GetQueueMetadataAsync_ValidNameWithMetadata_ReturnsMetadata() { IQueueServiceClient client = new QueueServiceClient(_accountSettings); var queueName = GenerateSampleQueueName(); var expectedMetadata = new Dictionary<string, string>(){ {"one", "1"}, {"two", "2"} }; _util.CreateQueue(queueName, expectedMetadata); var response = await client.GetQueueMetadataAsync(queueName); Assert.IsNotNull(response.Metadata); Assert.AreEqual(expectedMetadata.Count, response.Metadata.Count); foreach (var key in expectedMetadata.Keys) { Assert.AreEqual(expectedMetadata[key], response.Metadata[key]); } }