예제 #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>();
        }
예제 #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();
        }
예제 #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();
        }