public void Should_exact_match_should_match() { var bindingInfo = new BindingInfo(new QueueInfo("the queue", true, false, false, null), "abc"); bindingInfo.RoutingKeyMatches("abc").ShouldBeTrue(); bindingInfo.RoutingKeyMatches("def").ShouldBeFalse(); }
public void Everything_should_match_hash() { var bindingInfo = new BindingInfo(new QueueInfo("the queue", true, false, false, null), "#"); bindingInfo.RoutingKeyMatches("abc").ShouldBeTrue(); bindingInfo.RoutingKeyMatches("def").ShouldBeTrue(); }
public void Dot_separated_keys_should_match_with_wild_cards() { var bindingInfo = new BindingInfo(new QueueInfo("the queue", true, false, false, null), "a.*.c"); bindingInfo.RoutingKeyMatches("a.b.c").ShouldBeTrue(); bindingInfo.RoutingKeyMatches("a.d.c").ShouldBeTrue(); bindingInfo.RoutingKeyMatches("a.b.d").ShouldBeFalse(); }