Ejemplo n.º 1
0
 public async Task Remove(int id)
 {
     if (!await WebsiteRepository.Remove(id))
     {
         throw new NotFoundError($"Delete Failed. Website with id {id} not found");
     }
 }
        public void TestDeleteWebsite()
        {
            Website response;
            var     id = WebsiteWaldo.GetAnExistingIdByName(websiteRepo, "Facebook Updated");

            try
            {
                websiteRepo.Remove(id);
                websiteRepo.Save();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Assert.Fail();
                throw;
            }
        }