private async Task CreateQueue() { var management = new ManagementClient(_options.ConnectionString); await management.CreateQueueIfNotExistsAsync(_options.QueueName, queue => { queue.DefaultMessageTimeToLive = Consts.DefaultMessageTimeToLive; }); }
public async Task CanDeleteQueueThatDoesNotExist() { var queueName = TestConfig.GetName("delete"); await _managementClient.CreateQueueIfNotExistsAsync(queueName); await _managementClient.DeleteQueueIfExistsAsync(queueName); Assert.That(await _managementClient.QueueExistsAsync(queueName), Is.False, $"The queue {queueName} still exists"); }
public async static Task CreateQueueIfNotExistsAsync(this ManagementClient client, string queueName) => await client.CreateQueueIfNotExistsAsync(queueName, null);