public void miss() { var rule = new TopicRuleByType <Message1>(m => "wrong"); rule.Matches(typeof(LogMessage)) .ShouldBeFalse(); }
public void hit() { var rule = new TopicRuleByType <LogMessage>(m => m.Priority); rule.Matches(typeof(LogMessage)) .ShouldBeTrue(); rule.DetermineTopicName(new LogMessage { Priority = "Low" }) .ShouldBe("Low"); }