public void WillSetQueueUriOnConstructionFromQueuePath() { var queuePath = Path.Combine(BasePath, QueueName); var queue = new StandaloneAzureQueue(queuePath); Assert.Equal(queuePath, queue.Uri.LocalPath); }
public void WillSetQueueUriOnConstructionFromQueueUriWithToken() { var queuePath = Path.Combine(BasePath, QueueName); var queue = new StandaloneAzureQueue(new Uri(queuePath + "?some=token")); Assert.Equal(queuePath, queue.Uri.LocalPath); }
public void WillSetQueueNameOnConstructionFromQueueUri() { var queuePath = Path.Combine(BasePath, QueueName); var queue = new StandaloneAzureQueue(new Uri(queuePath)); Assert.Equal(QueueName, queue.Name); }
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 WillReturnParseableSharedAccessSignature( SharedAccessQueuePermissions permissions, string expectedPermissions) { var queue = new StandaloneAzureQueue(BasePath, QueueName); Assert.Contains(expectedPermissions, queue.GetSharedAccessSignature(new SharedAccessQueuePolicy { Permissions = permissions })); }
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 WillNotThrowIfConditionallyDeletingNonExistantQueue() { var queue = new StandaloneAzureQueue(BasePath, QueueName); Assert.DoesNotThrow(() => queue.DeleteIfExistsAsync()); }
public void WillThrowIfDeletingQueueThatDoesNotExist() { var queue = new StandaloneAzureQueue(BasePath, QueueName); Assert.Throws <StorageException>(() => queue.DeleteAsync()); }