コード例 #1
0
        public void publishes_is_false_if_no_rules_pass()
        {
            var node = new ChannelNode();

            for (int i = 0; i < 5; i++)
            {
                node.Rules.Add(MockRepository.GenerateMock <IRoutingRule>());
            }


            node.Publishes(typeof(NewUser)).ShouldBeFalse();
        }
コード例 #2
0
        public void publishes_is_true_if_any_rule_passes()
        {
            var node = new ChannelNode();

            for (int i = 0; i < 5; i++)
            {
                node.Rules.Add(MockRepository.GenerateMock <IRoutingRule>());
            }

            node.Rules[2].Stub(x => x.Matches(typeof(NewUser))).Return(true);

            node.Publishes(typeof(NewUser)).ShouldBeTrue();
        }
コード例 #3
0
        public void no_publishing_rules_is_always_false()
        {
            var node = new ChannelNode();

            node.Publishes(typeof(NewUser)).ShouldBeFalse();
        }