Beispiel #1
0
        public void TestIfWeReceiveTheMessageSent()
        {
            RabbitMQProducer rmp = new RabbitMQProducer("165.22.199.153", "admin", "2MmV2KjEhX36DaZeyAqhbifbp86YDxHG7yJq2R7JPJwJiXvN7jXpqhxjUr4ZCkGL");

            rmp.Send("test_queue", "testing");

            RabbitMQConsumer rmc = new RabbitMQConsumer("165.22.199.153", "admin", "2MmV2KjEhX36DaZeyAqhbifbp86YDxHG7yJq2R7JPJwJiXvN7jXpqhxjUr4ZCkGL");

            Assert.AreEqual("testing", rmc.Receive("test_queue"));
        }
Beispiel #2
0
        public void Test_Read_With_Incorrect_HostName()
        {
            RabbitMQConsumer rmq = new RabbitMQConsumer("165.22.199.15", "admin", "2MmV2KjEhX36DaZeyAqhbifbp86YDxHG7yJq2R7JPJwJiXvN7jXpqhxjUr4ZCkGL");

            Assert.ThrowsException <RabbitMQ.Client.Exceptions.BrokerUnreachableException>(() => rmq.Receive("Test_Queue"));
        }
Beispiel #3
0
        public void Comsumer_WithExpectedParameters()
        {
            RabbitMQConsumer consumer = new RabbitMQConsumer();

            consumer.Receive(queue.Example01, durable: true);
        }