public void SetQosPreFetchLimit()
        {
            ushort expected = 1000;
            RabbitConsumerBuilder outSubject = subject.SetQosPreFetchLimit(expected);

            Assert.IsNotNull(outSubject);
            Assert.AreEqual(expected, outSubject.QosPreFetchLimit);
        }
        public void UseClassicQueue()
        {
            RabbitConsumerBuilder actual = subject.UseQueueType(RabbitQueueType.classic);

            Assert.AreEqual(subject, actual);

            Assert.AreEqual(subject.QueueArguments["x-queue-type"], "classic");
        }
 public void InitializeRabbitConsumerBuilderTest()
 {
     mockConnectionCreator = new Mock <IRabbitConnectionCreator>();
     mockConnection        = new Mock <IConnection>();
     mockModel             = new Mock <IModel>();
     mockConnection.Setup(connection => connection.CreateModel()).Returns(mockModel.Object);
     mockConnectionCreator.Setup(c => c.GetConnection()).Returns(mockConnection.Object);
     mockConnectionCreator.Setup(c => c.GetChannel()).Returns(mockModel.Object);
     subject       = new RabbitConsumerBuilder(mockConnectionCreator.Object, expectedPreFetchLimit);
     expectedTuple = new Tuple <string, string>(expectedQueue, expectedRoutingKey);
 }
        public void UseQuorumQueues()
        {
            RabbitConsumerBuilder actual = subject.UseQueueType(RabbitQueueType.quorum);

            Assert.IsNotNull(actual);

            IDictionary <string, object> args = subject.QueueArguments;

            Assert.IsNotNull(args);

            Assert.AreEqual(expectedQuorumQueueValue, args[expectedQuorumQueueProp]);
        }