コード例 #1
0
        public void WriteRead_LargeObject_Ok()
        {
            MemoryStream ms  = new MemoryStream();
            Rss          rss = GetFullRSS();

            RSSHelper.WriteRSS(rss, ms);
            ms.Position = 0;
            Rss newRss = RSSHelper.ReadRSS(ms);

            Assert.AreEqual(rss.Channel.Description, newRss.Channel.Description);
        }
コード例 #2
0
        public void Read_External_Ok()
        {
            MemoryStream ms    = new MemoryStream();
            var          array = Encoding.UTF8.GetBytes(GetPartRSSText());

            ms.Write(array, 0, array.Length);
            ms.Position = 0;

            Rss rss = RSSHelper.ReadRSS(ms);

            Assert.AreEqual("channel title", rss.Channel.Title);
            Assert.AreEqual("long description", rss.Channel.Description);
        }