Skip to content

Commit 0095855

Browse files
committed
unit test for case-insensitive argument matching
1 parent 5cb8e92 commit 0095855

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,30 @@ public void SinkWithIntArrayArgument()
492492
Assert.Equal(1, DummyRollingFileSink.Emitted.Count);
493493
}
494494

495+
[Trait("Bugfix", "#111")]
496+
[Fact]
497+
public void CaseInsensitiveArgumentNameMatching()
498+
{
499+
var json = @"{
500+
""Serilog"": {
501+
""Using"": [""TestDummies""],
502+
""WriteTo"": [{
503+
""Name"": ""DummyRollingFile"",
504+
""Args"": {""PATHFORMAT"" : ""C:\\""}
505+
}]
506+
}
507+
}";
508+
509+
var log = ConfigFromJson(json)
510+
.CreateLogger();
511+
512+
DummyRollingFileSink.Emitted.Clear();
513+
514+
log.Write(Some.InformationEvent());
515+
516+
Assert.Equal(1, DummyRollingFileSink.Emitted.Count);
517+
}
518+
495519
[Trait("Bugfix", "#91")]
496520
[Fact]
497521
public void WriteToLoggerWithRestrictedToMinimumLevelIsSupported()

0 commit comments

Comments
 (0)