public void Given_An_Archetype_Page_Url_With_No_FurtherResultsUrl_Should_Not_Throw_NullException() { // Arrange var archetypePageUrl = "http://yugioh.wikia.com/wiki/List_of_%22Dizzy%22_cards"; var document = new HtmlWebPage().Load(archetypePageUrl); // Act Action act = () => _sut.GetFurtherResultsUrl(document); // Assert act.Should().NotThrow <NullReferenceException>(); }
public void Given_A_Card_HtmlDocument_Should_Return_CardType(string cardProfileUrl, string expected) { // Arrange var htmlDocument = new HtmlWebPage().Load(cardProfileUrl); // Act var result = _sut.CardType(htmlDocument); // Assert result.Should().BeEquivalentTo(expected); }
public void Given_An_Archetype_Page_Url_Should_Return_FurtherResultsUrl(string archetypeUrl, string expected) { // Arrange var document = new HtmlWebPage().Load(archetypeUrl); // Act var result = _sut.GetFurtherResultsUrl(document); // Assert result.Should().BeEquivalentTo(expected); }
public void Given_A_Card_HtmlDocument_With_No_Description_Should_Return_Empty_String(string cardProfileUrl) { // Arrange var htmlDocument = new HtmlWebPage().Load(cardProfileUrl); // Act var result = _sut.Description(htmlDocument); // Assert result.Should().BeEmpty(); }
public void Given_A_Card_HtmlDocument_Should_Return_Description(string cardProfileUrl) { // Arrange var htmlDocument = new HtmlWebPage().Load(cardProfileUrl); // Act var result = _sut.Description(htmlDocument); // Assert result.Should().NotBeNullOrWhiteSpace(); }
public void Given_A_Card_HtmlDocument_Should_Return_PendulumScale(string cardProfileUrl, long expected) { // Arrange var htmlDocument = new HtmlWebPage().Load(cardProfileUrl); // Act var result = _sut.PendulumScale(htmlDocument); // Assert result.Should().Be(expected); }
public void Given_A_Valid_Monster_Card_Profile_Url_Should_Extract_Card_LinkArrows(string cardProfileUrl, string expected) { // Arrange var htmlDocument = new HtmlWebPage().Load(cardProfileUrl); // Act var result = _sut.LinkArrows(htmlDocument); // Assert result.Should().BeEquivalentTo(expected); }
public void Given_A_SemanticSearch_Url_Should_Extract_Cards_From_Url(string url) { // Arrange var htmlDocument = new HtmlWebPage().Load(url); var semanticUrl = new TipRelatedHtmlDocument(_config).GetUrl(htmlDocument); // Act var result = _sut.CardsByUrl(semanticUrl); // Assert result.Should().NotBeNullOrEmpty(); }
public void Given_A_Card_Profile_WebPage_Url_Should_Extract_Card_CardEffectTypes(string url, string expected) { // Arrange var htmlWebPage = new HtmlWebPage(); var htmlDocument = htmlWebPage.Load(url); // Act var result = _sut.CardEffectTypes(htmlDocument); // Assert result.Should().BeEquivalentTo(expected); }
public void Given_A_Card_Profile_WebPage_Url_Should_Extract_Card_Level(string url, int expected) { // Arrange var htmlWebPage = new HtmlWebPage(); var htmlDocument = htmlWebPage.Load(url); // Act var result = _sut.Level(htmlDocument); // Assert result.Should().Be(expected); }
public void SetUp() { _sut = new HtmlWebPage(); }