public void GeocodingAsyncInvalidClientCredentialsThrowsTest() { var _request = new GeocodingRequest { Address = "285 Bedford Ave, Brooklyn, NY 11211, USA", ClientId = "gme-ThisIsAUnitTest", SigningKey = "AAECAwQFBgcICQoLDA0ODxAREhM=" }; MapsTest.ThrowInnerException(() => GoogleMaps.Geocode.QueryAsync(_request).Wait()); }
public void GeocodingAsyncTimeoutTooShortThrowsTest() { var _request = new GeocodingRequest { Address = "285 Bedford Ave, Brooklyn, NY 11211, USA" }; MapsTest.ThrowInnerException(() => GoogleMaps.Geocode.QueryAsync(_request, TimeSpan.FromMilliseconds(1)).Wait()); }
public void GeocodingAsyncCancelThrowsTest() { var _request = new GeocodingRequest { Address = "285 Bedford Ave, Brooklyn, NY 11211, USA" }; var _tokeSource = new CancellationTokenSource(); var _task = GoogleMaps.Geocode.QueryAsync(_request, _tokeSource.Token); _tokeSource.Cancel(); MapsTest.ThrowInnerException(_task); }