Skip to content

Commit

Permalink
Get rid of HeuristicUnreachableCode warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tsimbalar committed Oct 16, 2017
1 parent 4c231f2 commit af0d217
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/Serilog.Tests/Settings/KeyValuePairSettingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

}
Expand Down

0 comments on commit af0d217

Please sign in to comment.