示例#1
0
        public void GetContent_ContentWasFound_ContentIsCorrect()
        {
            WebDownloaderResult result = WebDownloader.GetContent("http://laboru.co/hello.txt");

            Assert.AreEqual("hello", result.HtmlContent);
        }
示例#2
0
        public void GetContent_UrlIsNotFound_ResponseStatusIsUrlNotFound()
        {
            WebDownloaderResult result = WebDownloader.GetContent("http://laboru.co/hello.tx");

            Assert.AreEqual(true, result.Status == DownloadResultStatus.UrlNotFound);
        }
示例#3
0
        public void GetContent_ContentWasFound_HtmlHasContent()
        {
            WebDownloaderResult result = WebDownloader.GetContent("http://laboru.co/hello.txt");

            Assert.AreEqual(true, !String.IsNullOrEmpty(result.HtmlContent));
        }