private static Privacy LoadPrivacy() { PrivacyList privacies = new PrivacyList(); privacies.Load(); Privacy privacy = privacies.FirstOrDefault(p => p.Description == "Public"); return(privacy); }
public void Delete() { PrivacyList privacys = new PrivacyList(); privacys.Load(); Privacy privacy = privacys.FirstOrDefault(p => p.Description == "TestUpdate"); int rowsAffected = privacy.Delete(); Assert.IsTrue(rowsAffected == 1); }
public void LoadById() { PrivacyList privacys = new PrivacyList(); privacys.Load(); Privacy privacy = new Privacy(); privacy.LoadById(privacys.FirstOrDefault(p => p.Description == "Test").Id); Assert.AreEqual("Test", privacy.Description); }