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(); }
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(); }
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(); }
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(); }
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(); }