Skip to content

Commit a0dc3de

Browse files
committed
Fix tests
1 parent f278d48 commit a0dc3de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Servers/Kestrel/Kestrel/test/ConfigurationReaderTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public void ReadEndpointWithMissingUrl_Throws()
9797
{
9898
new KeyValuePair<string, string>("Endpoints:End1", ""),
9999
}).Build();
100-
Assert.Throws<InvalidOperationException>(() => new ConfigurationReader(config));
100+
var reader = new ConfigurationReader(config);
101+
Assert.Throws<InvalidOperationException>(() => reader.Endpoints);
101102
}
102103

103104
[Fact]
@@ -107,7 +108,8 @@ public void ReadEndpointWithEmptyUrl_Throws()
107108
{
108109
new KeyValuePair<string, string>("Endpoints:End1:Url", ""),
109110
}).Build();
110-
Assert.Throws<InvalidOperationException>(() => new ConfigurationReader(config));
111+
var reader = new ConfigurationReader(config);
112+
Assert.Throws<InvalidOperationException>(() => reader.Endpoints);
111113
}
112114

113115
[Fact]

0 commit comments

Comments
 (0)