public void WillSetQueueUriOnConstructionFromQueueUri()
        {
            var queuePath = Path.Combine(BasePath, QueueName);

            var queue = new StandaloneAzureQueue(new Uri(queuePath));

            Assert.Equal(queuePath, queue.Uri.LocalPath);
        }
        public void WillSetQueueNameOnConstructionFromQueuePath()
        {
            var queuePath = Path.Combine(BasePath, QueueName);

            var queue = new StandaloneAzureQueue(queuePath);

            Assert.Equal(QueueName, queue.Name);
        }
        public void WillSetQueueUriOnConstructionFromStorageDirectoryAndQueueName()
        {
            var queue = new StandaloneAzureQueue(BasePath, QueueName);

            Assert.Equal(Path.Combine(BasePath, QueueName), queue.Uri.LocalPath);
        }
        public void WillSetQueueNameOnConstructionFromStorageDirectoryAndQueueName()
        {
            var queue = new StandaloneAzureQueue(BasePath, QueueName);

            Assert.Equal(QueueName, queue.Name);
        }
        public void WillReturnParseableSharedAccessSignature(
            SharedAccessQueuePermissions permissions,
            string expectedPermissions)
        {
            var queue = new StandaloneAzureQueue(BasePath, QueueName);

            Assert.Contains(expectedPermissions, queue.GetSharedAccessSignature(new SharedAccessQueuePolicy
            {
                Permissions = permissions
            }));
        }
        public void WillNotThrowIfConditionallyDeletingNonExistantQueue()
        {
            var queue = new StandaloneAzureQueue(BasePath, QueueName);

            Assert.DoesNotThrow(() => queue.DeleteIfExistsAsync());
        }
        public async Task CanConditionallyDeleteQueue()
        {
            var queue = new StandaloneAzureQueue(BasePath, QueueName);
            await queue.CreateIfNotExistsAsync();

            await queue.DeleteIfExistsAsync();

            Assert.False(Directory.Exists(Path.Combine(BasePath, QueueName)));
        }
        public void WillThrowIfDeletingQueueThatDoesNotExist()
        {
            var queue = new StandaloneAzureQueue(BasePath, QueueName);

            Assert.Throws<StorageException>(() => queue.DeleteAsync());
        }