Example #1
0
        public void GetLinksToFiles_WhenPageNotContainLinks_ReturnsEmptyList()
        {
            var frontPageStub = string.Empty;

            var expected = Enumerable.Empty <string>();
            var actual   = LinkSeeker.GetLinksToFiles(frontPageStub);

            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void GetLinksToThreadPages_WhenPageContainLinks_ReturnsLinks()
        {
            var frontPageStub = WebsiteFake.FrontPage;

            var expected = "http://www.AnyPage.com/unreal-for-mobile-and-standalone-vr/";
            var actual   = LinkSeeker.GetLinksToThreadPages(frontPageStub).FirstOrDefault();

            Assert.AreEqual(expected, actual);
        }
Example #3
0
        public void GetLinksToFiles_WhenPageContainLinks_ReturnsLinks()
        {
            var threadPageStub = WebsiteFake.ThreadPage;

            var expected = "http://file.AnyPage.com/20190414/Unreal for Mobile and Standalone VR.pdf";
            var actual   = LinkSeeker.GetLinksToFiles(threadPageStub).FirstOrDefault();

            Assert.AreEqual(expected, actual);
        }