Пример #1
0
        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();
        }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }
Пример #4
0
        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();
        }
Пример #5
0
        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();
        }
Пример #6
0
        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();
        }