public void QueueBind_binds_an_exchange_to_a_queue() { var server = new RabbitServer(); using (var model = new FakeModel(server)) { const string queueName = "someQueue"; const string exchangeName = "someExchange"; const string routingKey = "someRoutingKey"; var arguments = new Dictionary <string, object>(); model.ExchangeDeclare(exchangeName, "direct"); model.QueueDeclare(queueName); model.QueueBind(queueName, exchangeName, routingKey, arguments); AssertEx.AssertBinding(server, exchangeName, routingKey, queueName); } }
public void QueueBind_BindsAnExchangeToAQueue() { // Arrange var node = new RabbitServer(); using (var model = new FakeModel(node)) { const string queueName = "someQueue"; const string exchangeName = "someExchange"; const string routingKey = "someRoutingKey"; var arguments = new Dictionary <string, object>(); model.ExchangeDeclare(exchangeName, "direct"); model.QueueDeclarePassive(queueName); // Act model.QueueBind(queueName, exchangeName, routingKey, arguments); // Assert AssertBinding(node, exchangeName, routingKey, queueName); } }