예제 #1
0
        public void LookupByBoundsCanStillReturnOutsideResults()
        {
            var service = new GeocodingService(new NoAuthentication(), false);
            var result  = service
                          .LookupByAddressInBounds("Balmoral", new GeocodingGeometryLocationBounds
            {
                Southwest = new GeocodingGeometryLocation {
                    Latitude = 72.228294m, Longitude = -169.136192m
                },
                Northeast = new GeocodingGeometryLocation {
                    Latitude = 20.635313m, Longitude = -47.878356m
                }
            });

            result.Results.Should().NotBeEmpty();
        }
예제 #2
0
        public void CanStrictlyGeofenceLookupRequests()
        {
            var service = new GeocodingService(new NoAuthentication(), false);
            var result  = service
                          .LookupByAddressInBounds("Balmoral", new GeocodingGeometryLocationBounds
            {
                Southwest = new GeocodingGeometryLocation {
                    Latitude = 72.228294m, Longitude = -169.136192m
                },
                Northeast = new GeocodingGeometryLocation {
                    Latitude = 20.635313m, Longitude = -47.878356m
                }
            }, true);

            result.Results.Should().BeEmpty();
        }