示例#1
0
        public void NodesAreReturned()
        {
            var webPageParser = new WebPageParser(_url);

            var nodes = webPageParser.GetNodes("cnn");

            nodes.Should().NotBeEmpty();
        }
示例#2
0
        public void NoNodes()
        {
            var webPageParser = new WebPageParser(_url);
            var searchPhrase  = "frisjdnviuejksmfnhks";

            var nodes = webPageParser.GetNodes(searchPhrase);

            nodes.Should().BeEmpty();
        }
示例#3
0
        public void NodesPropertiesAreAssigned()
        {
            var webPageParser = new WebPageParser(_url);
            var searchPhrase  = "cnn";

            var nodes = webPageParser.GetNodes(searchPhrase);
            var node  = nodes.First();

            node.SearchPhrase.Should().Be(searchPhrase);
            node.Url.Should().Be(_url);
        }