public void TestDeleteRestaurant() { RestaurantSeeder.Seed(); var bo = new RestaurantBusinessObject(); var resList = bo.List(); var resDelete = bo.Delete(resList.Result.First().Id); resList = bo.ListNonDeleted(); Assert.IsTrue(resDelete.Success && resList.Success && resList.Result.Count == 0); }
public void TestUpdateRestaurant() { RestaurantSeeder.Seed(); var bo = new RestaurantBusinessObject(); var resList = bo.List(); var item = resList.Result.FirstOrDefault(); item.Name = "another"; var resUpdate = bo.Update(item); resList = bo.ListNonDeleted(); Assert.IsTrue(resList.Success && resUpdate.Success && resList.Result.First().Name == "another"); }