diff --git a/binding/csharp/IP2Region.Net.Test/UtilTest.cs b/binding/csharp/IP2Region.Net.Test/UtilTest.cs index aad3a28..8d6eb3d 100644 --- a/binding/csharp/IP2Region.Net.Test/UtilTest.cs +++ b/binding/csharp/IP2Region.Net.Test/UtilTest.cs @@ -4,11 +4,17 @@ namespace IP2Region.Net.Test; public class UtilTest { - [Theory] - [InlineData("114.114.114.114")] - public void TestIpAddressToUInt32(string value) + [Fact] + public void IpAddressToUInt32_Ok() { - var uintIp = XDB.Util.IpAddressToUInt32(value); - Console.WriteLine(uintIp); + var uintIp = XDB.Util.IpAddressToUInt32("114.114.114.114"); + Assert.Equal((uint)1920103026, uintIp); + } + + [Fact] + public void GetMidIp_Ok() + { + var uintIp = XDB.Util.GetMidIp(1, 10); + Assert.Equal((uint)5, uintIp); } } \ No newline at end of file