Ejemplo n.º 1
0
 private async Task CreateQueue()
 {
     var management = new ManagementClient(_options.ConnectionString);
     await management.CreateQueueIfNotExistsAsync(_options.QueueName, queue =>
     {
         queue.DefaultMessageTimeToLive = Consts.DefaultMessageTimeToLive;
     });
 }
Ejemplo n.º 2
0
        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");
        }
Ejemplo n.º 3
0
 public async static Task CreateQueueIfNotExistsAsync(this ManagementClient client, string queueName)
 => await client.CreateQueueIfNotExistsAsync(queueName, null);