public void DeleteQueue()
        {
            var rsmq = new Rsmq();

            rsmq.CreateQueue(new CreateQueueOptions {
                QueueName = Global.QueueName
            });
            Assert.AreEqual(1, rsmq.ListQueues().Count());
            rsmq.DeleteQueue(new DeleteQueueOptions {
                QueueName = Global.QueueName
            });
            Assert.Zero(rsmq.ListQueues().Count());
        }
        public void ListQueues()
        {
            var rsmq   = new Rsmq();
            var queues = rsmq.ListQueues();

            Assert.Zero(queues.Count());

            rsmq.CreateQueue(new CreateQueueOptions {
                QueueName = Global.QueueName
            });

            queues = rsmq.ListQueues();
            Assert.AreEqual(queues.Count(), 1);
            Assert.Contains(Global.QueueName, queues.ToArray());
        }
        public void CreateQueue(string value)
        {
            var rsmq = new Rsmq();

            Assert.AreEqual(1, rsmq.CreateQueue(new CreateQueueOptions {
                QueueName = value
            }));

            var queues = rsmq.ListQueues();

            Assert.Contains(value, queues.ToArray());
        }
        public void CreateQueueWithError()
        {
            var rsmq = new Rsmq();

            Assert.Throws <MissingParameterException>(() => rsmq.CreateQueue(new CreateQueueOptions {
                QueueName = null
            }));
            Assert.Throws <InvalidFormatException>(() => rsmq.CreateQueue(new CreateQueueOptions {
                QueueName = Global.WrongQueueNameFormat
            }));

            var queues = rsmq.ListQueues();

            Assert.Zero(queues.Count());
        }