public async Task TestReversePlaceId() { if (string.IsNullOrEmpty(settings.GeocodeAPIKey)) { Assert.Inconclusive("APIKey was not provided"); return; } var client = new GeocodeClient(settings.GeocodeAPIKey); var result = await client.GeocodeReverse("ChIJb9KHxsgEdkgRe82UfSxQIv0"); Assert.AreEqual(GeocodeStatus.Ok, result.Status); Assert.IsTrue(result.Results.Any(i => i.FormattedAddress == "London WC2N, UK")); }
public async Task TestReverseGeocode() { var client = new GeocodeClient(settings.GeocodeAPIKey); var result = await client.GeocodeReverse( new GeoCoordinate { Latitude = 51.5073509m, Longitude = -0.1277583m } ); Assert.AreEqual(GeocodeStatus.Ok, result.Status); Assert.IsTrue(result.Results.Any(i => i.FormattedAddress == "3 Whitehall, London SW1A 2DD, UK")); }