/// <summary> /// Delete all the <see cref="restaurantsToDelete"/> from the databse /// </summary> private async Task deleteTestResto() { var restaurantService = new RestaurantService(); foreach (var resto in restaurantsToDelete) { await restaurantService.Delete(resto.ID); } }
public async Task F_Delete_TakeFirstRestaurant_OneLessRestaurantInDb() { //Arrange var restaurantService = new RestaurantService(); restaurantsToDelete.Add(new Restaurant() { ID = new Guid("11000000-0000-0000-0000-000000000000") }); restaurantService.Create(restaurantsToDelete.First()); var count = restaurantService.GetAll().Count(); //Act await restaurantService.Delete(restaurantsToDelete.First().ID); //Assert Assert.AreNotEqual(count, restaurantService.GetAll().Count()); }