public void DirectBindingWithQueueName() { var directExchange = new DirectExchange("d"); var binding = BindingBuilder.Bind(queue).To(directExchange).WithQueueName(); Assert.NotNull(binding); Assert.Equal(directExchange.ExchangeName, binding.Exchange); Assert.Equal(Binding.DestinationType.QUEUE, binding.Type); Assert.Equal(queue.QueueName, binding.Destination); Assert.Equal(queue.QueueName, binding.RoutingKey); }
public void ExchangeBinding() { var directExchange = new DirectExchange("d"); var fanoutExchange = new FanoutExchange("f"); var binding = BindingBuilder.Bind(directExchange).To(fanoutExchange); Assert.NotNull(binding); Assert.Equal(fanoutExchange.ExchangeName, binding.Exchange); Assert.Equal(Binding.DestinationType.EXCHANGE, binding.Type); Assert.Equal(directExchange.ExchangeName, binding.Destination); Assert.Equal(string.Empty, binding.RoutingKey); }
public DirectExchangeRoutingKeyConfigurer To(DirectExchange exchange) { return(new DirectExchangeRoutingKeyConfigurer(this, exchange)); }
public DirectExchangeRoutingKeyConfigurer(DestinationConfigurer destination, DirectExchange exchange) : base(destination, exchange.ExchangeName) { }