Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }
Exemplo n.º 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();
        }