コード例 #1
0
        public void LogEventSeveritySwitch_IsAllowed_AllowsHigherSeverities()
        {
            var severitySwitch = new LogEventSeveritySwitch(LogEventSeverity.Error);

            Assert.IsTrue(severitySwitch.IsAllowed(LogEventSeverity.CriticalError));
            Assert.IsTrue(severitySwitch.IsAllowed(LogEventSeverity.FatalError));
        }
コード例 #2
0
        public void LogEventSeveritySwitch_IsAllowed_DisallowsLowerSeverities()
        {
            var severitySwitch = new LogEventSeveritySwitch(LogEventSeverity.Error);

            Assert.IsFalse(severitySwitch.IsAllowed(LogEventSeverity.Information));
        }
コード例 #3
0
        public void LogEventSeveritySwitch_IsAllowed_AllowsMinimumSeverity()
        {
            var severitySwitch = new LogEventSeveritySwitch(LogEventSeverity.Error);

            Assert.IsTrue(severitySwitch.IsAllowed(severitySwitch.MinimumSeverity));
        }