Пример #1
0
        public void GetTitleRetunsTitleFromHeadTag()
        {
            var req = new GetPageResponse {
                Content = "<html><head><title>test title</title></head></html>"
            };
            var pt  = new PageTitle();
            var res = pt.GetTitle(req);

            Assert.Equal("test title", res);
        }
Пример #2
0
        public void GetTitleRetunsEmptyStringWhenNoTitlePresent()
        {
            var req = new GetPageResponse {
                Content = "<html></html>"
            };
            var pt  = new PageTitle();
            var res = pt.GetTitle(req);

            Assert.Equal("", res);
        }