public void Matches_should_return_true_when_rule_has_no_source_or_operation_scope()
        {
            var rule = new LogConfigurationRule();

            rule.Matches(Event()).Should().BeTrue();
            rule.Matches(Event("src", "op")).Should().BeTrue();
        }
        public void Matches_should_handle_operation_context_requirement()
        {
            var rule = new LogConfigurationRule {
                Operation = "op"
            };

            rule.Matches(Event()).Should().BeFalse();
            rule.Matches(Event(operationContext: "some-other-op")).Should().BeFalse();

            rule.Matches(Event(operationContext: "op")).Should().BeTrue();
            rule.Matches(Event(operationContext: "OP")).Should().BeTrue();
            rule.Matches(Event("src", "Op-with-suffix")).Should().BeTrue();
        }
        public void Matches_should_handle_source_context_requirement()
        {
            var rule = new LogConfigurationRule {
                Source = "src"
            };

            rule.Matches(Event()).Should().BeFalse();
            rule.Matches(Event("some-other-source")).Should().BeFalse();

            rule.Matches(Event("src")).Should().BeTrue();
            rule.Matches(Event("SRC")).Should().BeTrue();
            rule.Matches(Event("Src-with-suffix", "op")).Should().BeTrue();
        }
        public void Matches_should_handle_source_and_operation_context_requirements()
        {
            var rule = new LogConfigurationRule {
                Source = "src", Operation = "op"
            };

            rule.Matches(Event()).Should().BeFalse();
            rule.Matches(Event("src")).Should().BeFalse();
            rule.Matches(Event(operationContext: "op")).Should().BeFalse();

            rule.Matches(Event("src", "op")).Should().BeTrue();
            rule.Matches(Event("SRC", "OP")).Should().BeTrue();
            rule.Matches(Event("Src-with-suffix", "Op-with-suffix")).Should().BeTrue();
        }