public async Task TestSkye() { var locationFinder = new LocationFinder(new LocationFinderConfiguration { BingMapsKey = MAPS_KEY }, geocoder); var coords = await locationFinder.GetLocationFromStringAsync("Skye"); Assert.NotNull(coords); }
public async Task TestWesternIsles() { var locationFinder = new LocationFinder(new LocationFinderConfiguration { BingMapsKey = MAPS_KEY }, geocoder); var coords = await locationFinder.GetLocationFromStringAsync("Stornoway"); Assert.NotNull(coords); Assert.AreEqual(coords.AdminDistrict2, "Na h-Eileanan Siar"); }
public async Task Alva() { var locationFinder = new LocationFinder(new LocationFinderConfiguration { BingMapsKey = MAPS_KEY }, geocoder); var coords = await locationFinder.GetLocationFromStringAsync("Alva"); Assert.NotNull(coords); Assert.AreEqual(coords.AdminDistrict2, "Clackmannanshire"); }
public async Task BaseGeoTest() { var locationFinder = new LocationFinder(new LocationFinderConfiguration { BingMapsKey = MAPS_KEY }, geocoder); var coords = await locationFinder.GetLocationFromStringAsync("Edinburgh"); Assert.NotNull(coords); Assert.AreEqual(coords.AdminDistrict2, "City of Edinburgh"); }
public async Task NotNullLocations(string location) { var locationFinder = new LocationFinder(new LocationFinderConfiguration { BingMapsKey = MAPS_KEY }, geocoder); var coords = await locationFinder.GetLocationFromStringAsync(location); Assert.NotNull(coords); System.Threading.Thread.Sleep(100);//don't overload bing }
public async Task TestForScotlandOnly() { Dictionary <string, string> testLocations = new Dictionary <string, string>(); testLocations["Banff"] = "Aberdeenshire"; testLocations["Inverkeithing"] = "Fife"; testLocations["Perth"] = "Perth and Kinross"; testLocations["johnogroats"] = "Highland"; var locationFinder = new LocationFinder(new LocationFinderConfiguration { BingMapsKey = MAPS_KEY }, geocoder); foreach (var location in testLocations) { var coords = await locationFinder.GetLocationFromStringAsync(location.Key); Assert.NotNull(coords); Assert.AreEqual(coords.AdminDistrict2, location.Value); System.Threading.Thread.Sleep(1000);//don't overload bing } }