Exemplo n.º 1
0
        public void Given_An_Invalid_ArticleId_Should_Throw_ArgumentOutOfRangeException(long articleId)
        {
            // Arrange
            // Act
            Func <Task <ContentResult> > act = () => _sut.Simple(articleId);

            // Assert
            act.Should().Throw <ArgumentOutOfRangeException>();
        }
Exemplo n.º 2
0
        public async Task Given_A_DomainUrl_And_ArticleId_SectionList_Should_Not_Be_Empty(string domainUrl, int articleId)
        {
            // Arrange
            IWikiArticle sut = new WikiArticle(domainUrl);

            // Act
            var result = await sut.Simple(articleId);

            // Assert
            result.Sections.Should().NotBeEmpty();
        }
Exemplo n.º 3
0
        public async Task Given_A_DomainUrl_And_ArticleId_Should_Successfully_Retrieve_Domain_Simple_ArticleInfo(string domainUrl, int articleId)
        {
            // Arrange
            var sut = new WikiArticle(domainUrl);

            // Act
            var result = await sut.Simple(articleId);

            // Assert
            result.Should().NotBeNull();
        }