public void TestDeleteRestaurantAsync() { RestaurantSeeder.SeedCountries(); var bo = new RestaurantBusinessObject(); var resList = bo.ListAsync().Result; var resDelete = bo.DeleteAsync(resList.Result.First().Id).Result; resList = bo.ListUnDeletedAsync().Result; Assert.IsTrue(resDelete.Success && resList.Success && resList.Result.Count == 0); }
public void TestUpdateRestaurantAsync() { RestaurantSeeder.SeedCountries(); var bo = new RestaurantBusinessObject(); var resList = bo.ListAsync().Result; var item = resList.Result.FirstOrDefault(); item.OpeningHours = "9h00"; var resUpdate = bo.UpdateAsync(item).Result; resList = bo.ListUnDeletedAsync().Result; Assert.IsTrue(resList.Success && resUpdate.Success && resList.Result.First().OpeningHours == "9h00"); }