Esempio n. 1
0
        public async Task CanReverseGeocodePoint(string rootUrl, string relativeUrl, double x, double y, int wkid)
        {
            var gateway        = new PortalGateway(rootUrl);
            var reverseGeocode = new ReverseGeocode(relativeUrl.AsEndpoint())
            {
                Location = new Point
                {
                    X = x,
                    Y = y,
                    SpatialReference = new SpatialReference {
                        Wkid = wkid
                    }
                }
            };
            var response = await gateway.ReverseGeocode(reverseGeocode);

            Assert.Null(response.Error);
            Assert.NotNull(response.Address);
            Assert.NotNull(response.Location);
        }
Esempio n. 2
0
        public async Task CanReverseGeocodePoint(string rootUrl, string relativeUrl, double x, double y, int wkid)
        {
            var gateway        = new PortalGateway(rootUrl);
            var reverseGeocode = new ReverseGeocode(relativeUrl)
            {
                Location = new Point
                {
                    X = x,
                    Y = y,
                    SpatialReference = new SpatialReference {
                        Wkid = wkid
                    }
                }
            };
            var response = await IntegrationTestFixture.TestPolicy.ExecuteAsync(() =>
            {
                return(gateway.ReverseGeocode(reverseGeocode));
            });

            Assert.Null(response.Error);
            Assert.NotNull(response.Address);
            Assert.NotNull(response.Location);
        }