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; } }
public void TestUpdatedWebsite() { Website response; var id = WebsiteWaldo.GetAnExistingIdByName(websiteRepo, "Facebook"); var website = new WebsiteBuilder(id).FacebookWebsite().UpdateName("Facebook Updated").Build(); try { response = websiteRepo.Update(id, website); websiteRepo.Save(); } catch (Exception e) { Console.WriteLine(e); Assert.Fail(); throw; } Assert.IsNotNull(response); Assert.AreEqual(website.CompanyName, response.CompanyName); Assert.AreEqual(website.WebsiteUrl, response.WebsiteUrl); }