Ejemplo n.º 1
0
 public void WithDefaultExchangeAndRoutingKey()
 {
     var address = new Address("direct:///routing-key");
     Assert.AreEqual(ExchangeTypes.Direct, address.ExchangeType);
     Assert.AreEqual(string.Empty, address.ExchangeName);
     Assert.AreEqual("routing-key", address.RoutingKey);
     Assert.AreEqual("direct:///routing-key", address.ToString());
 }
Ejemplo n.º 2
0
 public void WithoutRoutingKey()
 {
     Address address = new Address("fanout://my-exchange");
     Assert.AreEqual(ExchangeType.Fanout, address.ExchangeType);
     Assert.AreEqual("my-exchange", address.ExchangeName);
     Assert.AreEqual("", address.RoutingKey);
     Assert.AreEqual("fanout://my-exchange/", address.ToString());
 }
Ejemplo n.º 3
0
 public void UnstructuredWithRoutingKeyOnly()
 {
     var address = new Address("my-routing-key");
     Assert.AreEqual("my-routing-key", address.RoutingKey);
     Assert.AreEqual("direct:///my-routing-key", address.ToString());
 }
Ejemplo n.º 4
0
 public void ToString()
 {
     var address = new Address(ExchangeTypes.Direct, "my-exchange", "routing-key");
     var replyToUri = "direct://my-exchange/routing-key";
     Assert.AreEqual(replyToUri, address.ToString());
 }