示例#1
0
        public void miss()
        {
            var rule = new TopicRuleByType <Message1>(m => "wrong");

            rule.Matches(typeof(LogMessage))
            .ShouldBeFalse();
        }
示例#2
0
        public void hit()
        {
            var rule = new TopicRuleByType <LogMessage>(m => m.Priority);

            rule.Matches(typeof(LogMessage))
            .ShouldBeTrue();

            rule.DetermineTopicName(new LogMessage {
                Priority = "Low"
            })
            .ShouldBe("Low");
        }