Skip to content

Commit 716934f

Browse files
authored
Merge pull request #357 from sungam3r/raw2
Switch to raw string literal
2 parents 01642e6 + 5e72f96 commit 716934f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

test/Serilog.Settings.Configuration.Tests/ConfigurationSettingsTests.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,17 +1351,19 @@ public void FilterWithIsAppliedWithCustomFilter()
13511351
[InlineData("switch1")]
13521352
public void TestLogLevelSwitchesCallback(string switchName)
13531353
{
1354-
var json = $@"{{
1355-
'Serilog': {{
1356-
'LevelSwitches': {{ '{switchName}': 'Information' }},
1357-
'MinimumLevel': {{
1358-
'Override': {{
1354+
var json = $$"""
1355+
{
1356+
'Serilog': {
1357+
'LevelSwitches': { '{{switchName}}': 'Information' },
1358+
'MinimumLevel': {
1359+
'Override': {
13591360
'System': 'Warning',
13601361
'System.Threading': 'Debug'
1361-
}}
1362-
}}
1363-
}}
1364-
}}";
1362+
}
1363+
}
1364+
}
1365+
}
1366+
""";
13651367

13661368
IDictionary<string, LoggingLevelSwitch> switches = new Dictionary<string, LoggingLevelSwitch>();
13671369
var readerOptions = new ConfigurationReaderOptions { OnLevelSwitchCreated = (name, levelSwitch) => switches[name] = levelSwitch };

0 commit comments

Comments
 (0)