public GeocodeService(string key, GeocoderNames geocoder)
        {
            var geocoderSettings = new List <GeocoderSettings>
            {
                new GeocoderSettings {
                    ApiKey = key, GeocoderName = geocoder
                },
            };

            geocodeManager = GeocodeManager.Create(geocoderSettings);
        }
 private static GeocodeResponse CreateFakeResponse(GeocoderNames geocoderName, AddressLookupStatus addressLookupStatus)
 {
     return(new GeocodeResponse
     {
         GeocoderId = geocoderName,
         Locations = new List <GeocodeResponseLocation>
         {
             new GeocodeResponseLocation
             {
                 Bounds = new Bounds
                 {
                     NorthEast = new LocationPair {
                         Latitude = 0, Longitude = 1
                     },
                     SouthWest = new LocationPair {
                         Latitude = 2, Longitude = 3
                     },
                 },
             },
         },
         Status = addressLookupStatus,
     });
 }
 /// <summary>
 /// Return the status of the passed Geocoder.
 /// Used for testing geocoder status filtering in unit tests.
 /// </summary>
 /// <param name="geocoderId"></param>
 /// <returns></returns>
 public GeocoderState GeocoderStatusById(GeocoderNames geocoderId)
 {
     return(currentGeocoderStates
            .FirstOrDefault(g => g.GeocoderId == geocoderId));
 }