예제 #1
0
        public void ParseHtmlForUrlsTest()
        {
            // arrange
            string uriPrefix = string.Empty;
            HtmlParser target = new HtmlParser(uriPrefix);
            string html = this.htmlFileContents;
            RssFeeds actual;

            // act
            actual = target.ParseHtmlForFeeds(html);

            // assert
            Assert.IsNotNull(actual);

            // DFB? where is a good place to put this test number
            Assert.AreEqual(this.currentFeedCount, actual.Feeds.Count());
        }
예제 #2
0
        /// <summary>
        /// Get RssFeeds from uri specified in config file
        /// </summary>
        /// <returns>RssFeeds from parsed html from uri</returns>
        public RssFeeds Get()
        {
            // get raw html
            this.uricontent = this.GetHtml();

            string uriPrefix = this.configuration.AzureFeedUriPrefix;

            // parse content into object
            HtmlParser htmlParser = new HtmlParser(uriPrefix);
            this.rssFeeds = htmlParser.ParseHtmlForFeeds(this.uricontent);

            return this.rssFeeds;
        }