public void isSameUriReturned()
        {
            Uri uri = new Uri("https://www.reddit.com/");

            GetWebPage page   = new GetWebPage();
            String     result = page.GetRandomUnit(uri);

            Assert.AreEqual(uri.ToString(), result);
        }
Esempio n. 2
0
        public async Task <SingleEpisode> getAllContent()
        {
            // This method will be publicly visible and will be the one consumed.
            string response = await GetWebPage.GetWebPageData(Common.ServiceUrls.showUrl + this._showId + "/" + this._episodeId); // Make a network call here to grab the content

            extractData(response);
            PopulateEpisode();
            return(this._singleEpisode);
        }
Esempio n. 3
0
        public async Task <SearchResult> getAllContent()
        {
            // This method will be publicly visible and will be the one consumed.
            //string parameters = "?page=" + this._currentPage.ToString();
            string response = await GetWebPage.GetWebPageData(Common.ServiceUrls.searchUrl + this._searchTerm); // Make a network call here to grab the content

            extractData(response);
            return(this._searchResult);
        }
Esempio n. 4
0
        public async Task <AllContentResult> getAllContent()
        {
            // This method will be publicly visible and will be the one consumed.
            string response = await GetWebPage.GetWebPageData(Common.ServiceUrls.allContentUrl); // Make a network call here to grab the content

            extractData(response);
            PopulateAllContentResult();
            return(this._allContentResult);
        }
Esempio n. 5
0
        public async Task <Shows> getAllContent(int current_page = 1)
        {
            this._currentPage = current_page;
            // This method will be publicly visible and will be the one consumed.
            string parameters = "?page=" + current_page.ToString();
            string response   = await GetWebPage.GetWebPageData(Common.ServiceUrls.allShowsUrl + parameters); // Make a network call here to grab the content

            extractData(response);
            PopulateAllContentResult();
            return(this._allShows);
        }
Esempio n. 6
0
        public async Task <ShowDetail> getAllContent()
        {
            string parameters = "?page=" + this._currentPage.ToString();
            // This method will be publicly visible and will be the one consumed.
            string response = await GetWebPage.GetWebPageData(Common.ServiceUrls.showUrl + this._showId + parameters); // Make a network call here to grab the content

            extractData(response);
            PopulateAllShow();
            PopulateShowDetail();
            return(this._show);
        }