Esempio n. 1
0
        public void SpecificationTest7()
        {
            var document = new JumonyParser().LoadDocument(Path.Combine(Environment.CurrentDirectory, "SpecificationTest7.html"));

            var link = document.FindFirstOrDefault("a");

            Assert.IsNotNull(link, "属性或内容包含特殊字符的标签解析失败");
            Assert.AreEqual(link.Attribute("href").Value(), "#", "属性内容包含 > 时解析失败。");
            Assert.AreEqual(link.Attribute("title").Value(), "this is a <a> tag", "属性内容包含 > 时解析失败。");
            //Assert.AreEqual( link.Elements().Count(), 0, "错误的解析了以特殊字符为标签名的标签" );
        }