public void Given_A_Null_ArticleDetailsRequestParameters_Should_Throw_ArgumentNullException() { // Arrange // Act Func <Task <ExpandedArticleResultSet> > act = () => _sut.Details((ArticleDetailsRequestParameters)null); // Assert act.Should().Throw <ArgumentNullException>(); }
public async Task Given_A_DomainUrl_And_ArticleId_ItemsList_Should_Not_Be_Empty(string domainUrl, int articleId) { // Arrange IWikiArticle sut = new WikiArticle(domainUrl); // Act var result = await sut.Details(articleId); // Assert result.Items.Should().NotBeEmpty(); }
public async Task Given_A_DomainUrl_And_ArticleId_Should_Successfully_Deserialize_Article_Details_Json(string domainUrl, int articleId) { // Arrange var sut = new WikiArticle(domainUrl); // Act var result = await sut.Details(articleId); // Assert result.Should().NotBeNull(); //Note: Details returns a Dictionary instead of an array as per documentation // http://yugioh.wikia.com/api/v1/#!/Articles/getDetails_get_1 }