public void Given_Semantic_WebPage_Url_Should_Load_WebPage_Without_Throwing_Any_Exceptions()
        {
            // Arrange
            const string url = "http://yugioh.fandom.com/index.php?title=Special%3AAsk&q=%5B%5BClass+1%3A%3AOfficial%5D%5D+%5B%5BCard+type%3A%3ANormal+Monster%5D%5D&po=%3FJapanese+name%0D%0A%3FRank%0D%0A%3FLevel%0D%0A%3FAttribute%0D%0A%3FType%0D%0A%3FMonster+type%0D%0A%3FATK+string%3DATK%0D%0A%3FDEF+string%3DDEF%0D%0A&eq=yes&p%5Bformat%5D=broadtable&sort_num=&order_num=ASC&p%5Blimit%5D=500&p%5Boffset%5D=&p%5Blink%5D=all&p%5Bsort%5D=&p%5Bheaders%5D=show&p%5Bmainlabel%5D=&p%5Bintro%5D=&p%5Boutro%5D=&p%5Bsearchlabel%5D=%E2%80%A6+further+results&p%5Bdefault%5D=&p%5Bclass%5D=+sortable+wikitable+smwtable+card-list&eq=yes";

            // Act
            Action act = () => _sut.Load(url);

            // Assert
            act.Should().NotThrow();
        }
Exemple #2
0
        public void Given_A_Html_Table_Row_Should_Extract_The_First_Card_MegasonicEye_Profile_WebPage_Url()
        {
            // Arrange
            const string expected = "https://yugioh.fandom.com/wiki/Megasonic_Eye";
            const string url      = "https://yugioh.fandom.com/wiki/Special:Ask?limit=500&offset=500&q=%5B%5BClass+1%3A%3AOfficial%5D%5D+%5B%5BCard+type%3A%3ANormal+Monster%5D%5D&p=format%3Dbroadtable%2Flink%3Dall%2Fheaders%3Dshow%2Fsearchlabel%3D%E2%80%A6-20further-20results%2Fclass%3D-20sortable-20wikitable-20smwtable-20card-2Dlist&po=%3FJapanese+name%0A%3FRank%0A%3FLevel%0A%3FAttribute%0A%3FType%0A%3FMonster+type%0A%3FATK+string%3DATK%0A%3FDEF+string%3DDEF%0A&sort=&order=&eq=yes#search";
            var          semanticSearchResultsWebPage = new SemanticSearchResultsWebPage(new HtmlWebPage());

            semanticSearchResultsWebPage.Load(url);

            // Act
            var result = _sut.Url(semanticSearchResultsWebPage.TableRows.First(), new Uri(url));

            // Assert
            result.Should().Be(expected);
        }