Skip to content

Commit 804f6d5

Browse files
committed
test: 增加单元测试
1 parent cc0a25a commit 804f6d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/UnitTest/Services/IpLocatorTest.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ public void Factory_Ok()
6868
Assert.NotNull(factory.Create("BaiduIpLocatorProviderV2"));
6969
Assert.NotNull(factory.Create("BaiduIpLocatorProvider"));
7070
Assert.NotNull(factory.Create());
71+
72+
Assert.NotNull(Context.Services.GetKeyedService<IIpLocatorProvider>("BaiduIpLocatorProvider"));
73+
Assert.NotNull(Context.Services.GetKeyedService<IIpLocatorProvider>("BaiduIpLocatorProviderV2"));
7174
}
7275

7376
[Fact]

0 commit comments

Comments
 (0)