Пример #1
0
        public void TestCopyright()
        {
            AtomContentConstruct copyright = new AtomContentConstruct("copyright");

            copyright.Content = " 2003 Buffalo Bill Corporations";
            copyright.Mode    = Mode.Xml;
            copyright.Type    = MediaType.TextPlain;

            feed.Copyright = copyright;
            Assert.AreEqual(copyright.LocalName, "copyright");
            Assert.AreEqual(copyright.FullName, "atom:copyright");
            Assert.AreSame(feed.Copyright, copyright);
        }
Пример #2
0
        public void TestTitle()
        {
            AtomContentConstruct title = new AtomContentConstruct();

            title.Content = "sample text";
            title.Mode    = Mode.Xml;
            title.Type    = MediaType.TextPlain;

            feed.Title = title;

            Assert.AreEqual(title.LocalName, "title");
            Assert.AreEqual(title.FullName, "atom:title");
            Assert.AreSame(feed.Title, title);
        }
Пример #3
0
        public void TestInfo()
        {
            AtomContentConstruct info = new AtomContentConstruct("info");

            info.Content = "Some not so useful infos";
            info.Mode    = Mode.Xml;
            info.Type    = MediaType.TextPlain;

            feed.Info = info;

            Assert.AreEqual(info.LocalName, "info");
            Assert.AreEqual(info.FullName, "atom:info");
            Assert.AreSame(feed.Info, info);
        }
Пример #4
0
        public void TestTagline()
        {
            AtomContentConstruct tagline = new AtomContentConstruct("tagline");

            tagline.Content = "sample text";
            tagline.Mode    = Mode.Xml;
            tagline.Type    = MediaType.TextPlain;

            feed.Tagline = tagline;

            Assert.AreEqual(tagline.LocalName, "tagline");
            Assert.AreEqual(tagline.FullName, "atom:tagline");
            Assert.AreSame(feed.Tagline, tagline);
        }
Пример #5
0
        public void TestSummary()
        {
            AtomContentConstruct summary = new AtomContentConstruct("summary");

            summary.Content = "sample text";
            summary.Mode    = Mode.Xml;
            summary.Type    = MediaType.TextPlain;

            entry.Summary = summary;

            Assert.AreEqual(summary.LocalName, "summary");
            Assert.AreEqual(summary.FullName, "atom:summary");
            Assert.AreSame(entry.Summary, summary);
        }
Пример #6
0
        public void TestTitle()
        {
            AtomContentConstruct title = new AtomContentConstruct(new Uri("http://purl.org/atom/ns#"));

            title.Content = "sample text";
            title.Mode    = Mode.Xml;
            title.Type    = MediaType.TextPlain;

            entry.Title = title;

            Assert.AreEqual(title.LocalName, "title");
            Assert.AreEqual(title.FullName, "atom:title");
            Assert.AreSame(entry.Title, title);
        }