예제 #1
0
        public void RssDocumentSelectItemsTest()
        {
            RssDocument target = RssUtility.GetRssDocumentFromUrl();
            IEnumerable actual;

            actual = target.SelectItems();
            System.Data.DataView view = (System.Data.DataView)target.SelectItems();
            Assert.IsTrue(actual.GetEnumerator().MoveNext(), "RssToolkit.Rss.RssDocument.SelectItems did not return the expected value.");
            Assert.IsTrue(view.Table.Rows.Count > 0, "RssToolkit.Rss.RssDocument.SelectItems did not return the expected value.");
        }
예제 #2
0
        public void RssDocumentSelectItemsTest2()
        {
            RssDocument target       = RssUtility.GetRssDocumentFromUrl();
            int         maxItems     = 10;
            bool        reverseOrder = true;
            IEnumerable actual       = target.SelectItems(maxItems, reverseOrder);

            System.Data.DataView view = (System.Data.DataView)target.SelectItems(maxItems, reverseOrder);
            Assert.IsTrue(actual.GetEnumerator().MoveNext(), "RssToolkit.Rss.RssDocument.SelectItems did not return the expected value.");
            Assert.IsTrue(view.Table.Rows.Count == 10, "RssToolkit.Rss.RssDocument.SelectItems did not return the expected value.");
        }