diff --git a/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs b/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs index 91c1da789..9b7e7f9fd 100644 --- a/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs +++ b/test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs @@ -313,12 +313,14 @@ public void LoggingLevelSwitchCanBeUsedForMinimumLevelOverrides() systemLogger.Write(Some.WarningEvent()); Assert.False(evt is null, "LoggingLevelSwitch initial level was Warning for logger System.*. It should log Warning messages for SourceContext System.Bar"); + // ReSharper disable HeuristicUnreachableCode evt = null; var controlSwitch = DummyWithLevelSwitchSink.ControlLevelSwitch; controlSwitch.MinimumLevel = LogEventLevel.Information; systemLogger.Write(Some.InformationEvent()); Assert.False(evt is null, "LoggingLevelSwitch level was changed to Information for logger System.*. It should now log Information events for SourceContext System.Bar."); + // ReSharper restore HeuristicUnreachableCode } }