Beispiel #1
0
        public void WithNoSwitchToControlEventsAreStillFiltered()
        {
            var cls = new ControlledLevelSwitch(null);

            cls.Update(LogEventLevel.Warning);
            Assert.True(cls.IsIncluded(Some.ErrorEvent()));
            Assert.False(cls.IsIncluded(Some.InformationEvent()));
        }
Beispiel #2
0
        public void WithNoSwitchToControlAllEventsAreIncludedAfterReset()
        {
            var cls = new ControlledLevelSwitch(null);

            cls.Update(LogEventLevel.Warning);
            cls.Update(null);
            Assert.True(cls.IsIncluded(Some.DebugEvent()));
        }
Beispiel #3
0
        public void WithNoSwitchToControlAllEventsAreIncluded()
        {
            var cls = new ControlledLevelSwitch(null);

            Assert.True(cls.IsIncluded(Some.DebugEvent()));
        }
Beispiel #4
0
 public bool IsIncluded(LogEvent logEvent)
 {
     return(_controlledSwitch.IsIncluded(logEvent));
 }