Example #1
0
        public void TestGetQueues()
        {
            AbstractConnectionFactory connectionFactory = new SingleConnectionFactory();

            connectionFactory.Port = BrokerTestUtils.GetAdminPort();
            Queue queue = new RabbitAdmin(connectionFactory).DeclareQueue();

            Assert.AreEqual("/", connectionFactory.VirtualHost);
            List <QueueInfo> queues = this.brokerAdmin.GetQueues();

            Assert.AreEqual(queue.Name, queues[0].Name);
        }
Example #2
0
 public void CreateConnectionFactory()
 {
     if (environment.IsActive())
     {
         var connectionFactory = new CachingConnectionFactory();
         connectionFactory.ChannelCacheSize = this.concurrentConsumers;
         connectionFactory.Port             = BrokerTestUtils.GetAdminPort();
         this.connectionFactory             = connectionFactory;
         this.brokerIsRunning = BrokerRunning.IsRunningWithEmptyQueues(this.queue);
         this.brokerIsRunning.Apply();
     }
 }