mirror of
https://github.com/lionsoul2014/ip2region.git
synced 2026-02-01 17:46:15 +00:00
test: 增加单元测试
This commit is contained in:
parent
9ef1fc34ac
commit
3aa732d1ce
@ -32,4 +32,11 @@ public class XdbTest
|
||||
Assert.Equal(6, version.IPVer);
|
||||
Assert.Equal(4, version.BytesCount);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetVersionAsync_Error()
|
||||
{
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(async () => await XDB.Util.GetVersionAsync(null));
|
||||
await Assert.ThrowsAsync<FileNotFoundException>(async () => await XDB.Util.GetVersionAsync(Path.Combine(AppContext.BaseDirectory, "test.xdb")));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user