Exemplo n.º 1
0
        private static Privacy LoadPrivacy()
        {
            PrivacyList privacies = new PrivacyList();

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

            return(privacy);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }