コード例 #1
0
        public void ProcessForcedRoutableWithLoglevelOutOfRange_ShouldReturn_Null()
        {
            var filter   = new LoglevelFilter <StandardLoglevel>(new StandardLoglevel[0], new StandardLoglevel[] { StandardLoglevel.Trace });
            var logEvent = new LogEvent <StandardLoglevel>((_logEvent) => { }, StandardLoglevel.Trace).Force;

            filter.Process(logEvent).Should().BeNull();
        }
コード例 #2
0
        public void ProcessRoutableWithinAllowedAndBlockedLoglevels_ShouldReturn_EmptyList()
        {
            var filter   = new LoglevelFilter <StandardLoglevel>(new StandardLoglevel[] { StandardLoglevel.Information }, new StandardLoglevel[] { StandardLoglevel.Information });
            var logEvent = new LogEvent <StandardLoglevel>((_logEvent) => { }, StandardLoglevel.Information);

            filter.Process(logEvent).Should().BeEmpty();
        }
コード例 #3
0
        public void ProcessBlockedLogLevel_ShouldReturn_EmptyList()
        {
            var filter   = new LoglevelFilter <StandardLoglevel>(new StandardLoglevel[0], new StandardLoglevel[] { StandardLoglevel.Information });
            var logEvent = new LogEvent <StandardLoglevel>((_logEvent) => { }, StandardLoglevel.Information);

            filter.Process(logEvent).Should().BeEmpty();
        }
コード例 #4
0
        public void ProcessRoutableWithNoLoglevelsConfigured_ShouldReturn_Null()
        {
            var filter   = new LoglevelFilter <StandardLoglevel>(new StandardLoglevel[0], new StandardLoglevel[0]);
            var logEvent = new LogEvent <StandardLoglevel>((_logEvent) => { }, StandardLoglevel.Information);

            filter.Process(logEvent).Should().BeNull();
        }
コード例 #5
0
        public void ProcessAllowedLoglevel_ShouldReturn_Null()
        {
            var filter   = new LoglevelFilter <StandardLoglevel>(new StandardLoglevel[] { StandardLoglevel.Information }, new StandardLoglevel[0]);
            var logEvent = new LogEvent <StandardLoglevel>((_logEvent) => { }, StandardLoglevel.Information);

            filter.Process(logEvent).Should().BeNull();
        }