Esempio n. 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()));
        }
Esempio n. 2
0
        public void WithNoSwitchToControlAllEventsAreIncludedAfterReset()
        {
            var cls = new ControlledLevelSwitch(null);

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

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