public void TestQueueService_DeclareQueue_InvalidExchange() { Assert.That(() => { BaseQueueService.Declare("non.existing.exchange", "company.queues.finance2"); }, Throws.TypeOf <ServiceException>()); }
public void TestQueueService_DeleteMany() { var qa = new QueueAddressModel() { Name = "company.queues.finance6", ExchangeName = "Test.Exchange" }; var qa1 = new QueueAddressModel() { Name = "company.queues.finance7", ExchangeName = "Test.Exchange" }; var q = new QueueDeleteModel() { Name = "company.queues.finance6" }; var q1 = new QueueDeleteModel() { Name = "company.queues.finance7" }; List <QueueDeleteModel> qs = new List <QueueDeleteModel>() { q, q1 }; List <QueueAddressModel> qas = new List <QueueAddressModel>() { qa, qa1 }; BaseQueueService.DeclareMany(qas); // Assert Assert.DoesNotThrow(() => { BaseQueueService.DeleteMany(qs); }); }
public void TestQueueService_DeleteObject() { var q = new QueueDeleteModel() { Name = "Test.ExchangeWithQueues.Queue1" }; // Assert Assert.DoesNotThrow(() => { BaseQueueService.Delete(q); }); }
public void TestQueueService_UnbindQueue() { // Create exchanges TestQueueService_DeclareQueue_ValidExchange(); // Data QueueBindingModel qu = new QueueBindingModel() { Source = "amq.direct", Destination = "company.queues.finance2" }; // Assert Assert.DoesNotThrow(() => { BaseQueueService.Unbind(qu); }); }
public void TestQueueService_DeclareQueue_ValidExchange() { Assert.DoesNotThrow(() => { BaseQueueService.Declare("amq.direct", "company.queues.finance2"); }); }
public void TestQueueService_DeleteString() { // Assert Assert.DoesNotThrow(() => { BaseQueueService.Delete("Test.ExchangeWithQueues.Queue2"); }); }