Exemplo n.º 1
0
        public void CanDuckTypeLoggingRuleInPre43()
        {
            var rule  = new LoggingRule();
            var proxy = rule.DuckCast <LoggingRuleProxy>();

            proxy.LoggerNamePattern = "TEST";
            for (int i = 0; i < 6; i++)
            {
                proxy.LogLevels[i] = true;
            }

            rule.LoggerNamePattern.Should().Be("TEST");
            rule.Levels
            ?.Select(x => x.Ordinal)
            .Should()
            .NotBeNull()
            .And.ContainInOrder(0, 1, 2, 3, 4, 5);
        }