public static async Task DeleteTestFoodFromAPI() { var allFoodItems = await FoodListAPIService.GetFoodLogs().ConfigureAwait(false); var pizzaFoodItemList = allFoodItems?.Where(x => x.Description.ToUpper().Equals(_testFoodDescription.ToUpper())).ToList() ?? new List <FoodLogModel>(); var deletePizzaTaskList = new List <Task>(); foreach (var pizzaFoodItem in pizzaFoodItemList) { deletePizzaTaskList.Add(FoodListAPIService.DeleteFoodFromAPI(pizzaFoodItem.Id)); } await Task.WhenAll(deletePizzaTaskList).ConfigureAwait(false); }
public static Task PostTestImageToAPI() => FoodListAPIService.PostFoodPhoto(TestImageAsByteArray);