예제 #1
0
        private static Privacy LoadPrivacy()
        {
            PrivacyList privacies = new PrivacyList();

            privacies.Load();
            Privacy privacy = privacies.FirstOrDefault(p => p.Description == "Public");

            return(privacy);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }