Ejemplo n.º 1
0
        public void Test03_RssLatestPublishDate_ValidURL3()
        {
            //arrange
            // expected datetime from XML: <pubDate>Sat, 24 Apr 2021 00:00:00 -0400</pubDate>
            DateTime?expected = DateTime.Parse("Sat, 24 Apr 2021 00:00:00 -0400");

            //act
            DateTime?actual = RssActivity.RssLatestPublishDate($"{baseURLTestFiles}/Test3Rss.xml");

            //assert
            Assert.AreEqual(expected, actual, expected.ToString() + " != " + actual.ToString());
        }
Ejemplo n.º 2
0
        public void Test04_RssLatestPublishDate_InvalidURL()
        {
            //arrange
            // expected value is null because of Invalid URL
            DateTime?expected = null;

            //act
            DateTime?actual = RssActivity.RssLatestPublishDate("MyInvalidURL");

            //assert
            Assert.AreEqual(expected, actual, expected.ToString() + " != " + actual.ToString());
        }
Ejemplo n.º 3
0
        public void Test02_RssLatestPublishDate_ValidURL2()
        {
            //arrange
            // expected datetime from XML: <pubDate>Wed, 10 Mar 2021 08:00:00 GMT</pubDate>
            DateTime?expected = DateTime.Parse("Wed, 10 Mar 2021 08:00:00 GMT");

            //act
            DateTime?actual = RssActivity.RssLatestPublishDate($"{baseURLTestFiles}/Test2Rss.xml");

            //assert
            Assert.AreEqual(expected, actual, expected.ToString() + " != " + actual.ToString());
        }