示例#1
0
        public void ParseNoAuthorHtml()
        {
            var context = TestUtilites.ExecuteExtractor(HtmlWithNoAuthor, new AuthorsExtractor());

            context.Authors
            .Should()
            .HaveCount(0);
        }
示例#2
0
        public void ParseTwoAuthorHtml()
        {
            var context = TestUtilites.ExecuteExtractor(HtmlWithTwoAuthor, new AuthorsExtractor());

            context.Authors
            .Should()
            .HaveCount(2)
            .And
            .Contain("John Smith", "Bill Gates");
        }
示例#3
0
        public void ParseOneAuthorHtml()
        {
            var context = TestUtilites.ExecuteExtractor(HtmlWithAuthor, new AuthorsExtractor());

            context.Authors
            .Should()
            .HaveCount(1)
            .And
            .Contain("John Smith");
        }