public async Task Test_PhotosforLocationAsync_NotNull() { string lat = "29.8587"; string lon = "31.0218"; int page = 1; Result result = await _searchRequest.GetPhotosforLocationAsync(lat, lon, page); Assert.IsNotNull(result); }
/// <summary> /// Get's and saves Pictures by Id and also saves the Location of the User /// </summary> /// <param name="place">The Location that was searched by the user </param> /// <param name="page">Use this for paging</param> /// <param name="userId">Id of the User</param> /// <returns></returns> public async Task <Result> GetLocationPicturesByIdAsync(Place place, int?page, string userId) { SaveUserLocation(place, userId); Result result = await _searchRequest.GetPhotosforLocationAsync(place.Latitude, place.Longitude, page.Value); #region TODO:// Implement Mef with HangFire //BackgroundJob.Enqueue(() => SavePictures(result, place)); #endregion HostingEnvironment.QueueBackgroundWorkItem(ct => SavePictures(result, place)); return(result); }