public GeocodingServiceTests() { var apiKey = ConfigurationManager.AppSettings["GoogleApiKey"]; if (string.IsNullOrEmpty(apiKey)) { throw new Exception("GoogleApiKey missing from the App.config file"); } Service = new GeocodingService(apiKey); }
public BaseLauncher() { UnitOfWork = new UnitOfWork(); CityRepository = new Repository<City>(UnitOfWork); ApartmentRepository = new Repository<Apartment>(UnitOfWork); var apiKey = ConfigurationManager.AppSettings["GoogleApiKey"]; if (string.IsNullOrEmpty(apiKey)) { throw new Exception("GoogleApiKey missing from the App.config file"); } GeocodingService = new GeocodingService(apiKey); }