Beispiel #1
0
        public void AddFeedTest_validArg_2EqualObj()
        {
            RSSAtomFeed c             = new RSSAtomFeed("uniqIdCollection", new SyndicationFeed());
            RSSAtomItem expectedValue = new RSSAtomItem("uniqIdFeed", "description", "text", "http:\\someurl.com", "title", DateTime.MinValue);

            c.AddFeed(new RSSAtomItem("uniqIdFeed", "description", "text", "http:\\someurl.com", "title", DateTime.MinValue));

            Assert.AreEqual(expectedValue, c[c.Count - 1]);
        }
Beispiel #2
0
        public void GetFeed_emptyStr_log()
        {
            RSSAtomFeed c = new RSSAtomFeed("uniqIdCollection", new SyndicationFeed());

            c.AddFeed(new RSSAtomItem("uniqIdFeed", "description", "text", "http:\\someurl.com", "title", DateTime.MinValue));

            RSSAtomItem result = c.GetFeed("");

            StringAssert.Contains(logger.Message, $"must be not empty string");
        }
Beispiel #3
0
        public void GetFeed_valigStr_2EqualObj()
        {
            RSSAtomFeed c = new RSSAtomFeed("uniqIdCollection", new SyndicationFeed());

            c.AddFeed(new RSSAtomItem("uniqIdFeed", "description", "text", "http:\\someurl.com", "title", DateTime.MinValue));

            RSSAtomItem expectedValue = new RSSAtomItem("uniqIdFeed", "description", "text", "http:\\someurl.com", "title", DateTime.MinValue);

            RSSAtomItem result = c.GetFeed("uniqIdFeed");

            Assert.AreEqual(expectedValue, result);
        }