public async void when_searching_for_nearby_places() { var sut = new NearbyPlacesClient(BaseUrl, SessionId, new DummyPackageInfo(), null, null); var addresses = await sut.GetNearbyPlaces(Latitude, Longitude); if (!addresses.Any()) { Assert.Inconclusive("no places returned"); } Assert.IsNotEmpty(addresses); CollectionAssert.AllItemsAreNotNull(addresses.Select(x => x.FriendlyName)); CollectionAssert.AllItemsAreNotNull(addresses.Select(x => x.FullAddress)); }
public void when_location_is_not_provided() { var sut = new NearbyPlacesClient(BaseUrl, SessionId, new DummyPackageInfo(), null, null); Assert.Throws <WebServiceException>(async() => await sut.GetNearbyPlaces(null, null), ErrorCode.NearbyPlaces_LocationRequired.ToString()); }