Example #1
0
        public void InvaliddIPAddress()
        {
            var am  = new AzureMapsToolkit.AzureMapsServices(_KEY);
            var res = am.GetIPToLocation("perfa").Result;

            Assert.True(res.Error != null);
        }
Example #2
0
        public async Task InvaliddIPAddress()
        {
            var am  = new AzureMapsToolkit.AzureMapsServices(_KEY);
            var res = await am.GetIPToLocation("perfa");

            Assert.True(res.Error != null);
        }
Example #3
0
        public void ValidIPCountry()
        {
            var am  = new AzureMapsToolkit.AzureMapsServices(_KEY);
            var res = am.GetIPToLocation("83.68.254.182").Result;

            Assert.Equal("SE", res.Result.CountryRegion.IsoCode);
        }
Example #4
0
        public async Task InvalidIPCountry()
        {
            var am  = new AzureMapsToolkit.AzureMapsServices(_KEY);
            var res = await am.GetIPToLocation("83.10.0.3");

            Assert.NotEqual("SE", res.Result.CountryRegion.IsoCode);
        }