示例#1
0
        public void CloneTest()
        {
            var item = new FeedItem(new Uri("http://www.test.com/rss/feed"), new DateTimeOffset(2020, 5, 5, 12, 0, 0, new TimeSpan(1, 0, 0)), "name", "desc");

            item.MarkAsRead = true;
            var clone = item.Clone();

            Assert.AreNotSame(item, clone);
            Assert.AreEqual(new DateTimeOffset(2020, 5, 5, 12, 0, 0, new TimeSpan(1, 0, 0)), clone.Date);
            Assert.AreEqual("name", clone.Name);
            Assert.AreEqual("desc", clone.Description);
            Assert.IsTrue(clone.MarkAsRead);
        }
示例#2
0
 private void SetFeed(FeedItem[] feed)
 {
     this.feed = (FeedItem[])feed.Clone();
 }