Skip to content

Commit 18965a3

Browse files
committed
add unit test
1 parent 9da4c26 commit 18965a3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Samhammer.Options.Test/OptionsResolverTest.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ public void OptionsFromConfiguration()
6868
result.Value.Should().BeEquivalentTo(expected);
6969
}
7070

71+
[Fact]
72+
public void OptionsFromConfiguration_MissingSection()
73+
{
74+
services.ResolveOptions(Configuration);
75+
76+
var result = ServiceProvider.GetService<IOptions<TestOptions>>();
77+
var expected = new TestOptions();
78+
79+
result.Value.Should().BeEquivalentTo(expected);
80+
}
81+
7182
[Fact]
7283
public void OptionsFromConfigurationAndCode()
7384
{

0 commit comments

Comments
 (0)