Exemplo n.º 1
0
        public void Given_A_Null_ArticleDetailsRequestParameters_Should_Throw_ArgumentNullException()
        {
            // Arrange

            // Act
            Func <Task <ExpandedArticleResultSet> > act = () => _sut.Details((ArticleDetailsRequestParameters)null);

            // Assert
            act.Should().Throw <ArgumentNullException>();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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
        }