public void SaveAndReadTest()
        {
            EmailListElement emailList = new EmailListElement("foo");
            entry.EmailList = emailList;

            StringBuilder sb = new StringBuilder();
            XmlWriter writer = new XmlTextWriter(new StringWriter(sb));
            entry.SaveToXml(writer);
            writer.Close();

            XmlDocument document = new XmlDocument();
            document.LoadXml(sb.ToString());

            EmailListEntry newEntry = new EmailListEntry();
            foreach (XmlNode node in document.FirstChild.ChildNodes)
            {
                ExtensionElementEventArgs args = new ExtensionElementEventArgs();
                args.ExtensionElement = node;
                args.Base = newEntry;
                newEntry.Parse(args, new AtomFeedParser());
            }

            Assert.AreEqual(emailList.Name, newEntry.EmailList.Name,
                "Parsed entry should have same email list name as original entry");
        }
        /// <summary>
        /// Constructs a new EmailListEntry instance with the specified list name.
        /// </summary>
        /// <param name="emailListName">the name of the email list</param>
        public EmailListEntry(String emailListName)
            : base()
        {
            Categories.Add(EMAILLIST_CATEGORY);

            GAppsExtensions.AddProvisioningExtensions(this);

            EmailList = new EmailListElement(emailListName);
        }
 public void Init()
 {
     emailList = new EmailListElement("testList");
 }
 public void SetEmailListTest()
 {
     EmailListElement emailList = new EmailListElement("foo");
     entry.EmailList = emailList;
     Assert.AreEqual(emailList, entry.EmailList, "Email list element should be updated after setting");
 }