Beispiel #1
0
        public void TestAnalyseTemplate_一般情况()
        {
            string html = string.Empty;

            using (StreamReader reader = new StreamReader(TestContext.TestDeploymentDir + "\\TemplateFiles\\01.单个模板项.一般情况.htm"))
            {
                html = reader.ReadToEnd();

                reader.Close();
            }

            TemplateObject info = TemplateAnalyser.AnalyseTemplate(html);

            Assert.IsNotNull(info);
            Assert.AreEqual("list", info.Category);
            Assert.AreEqual("TestDisp", info.DisplayName);
            Assert.AreEqual("Image", info.DataType);
            Assert.AreEqual(html.ToString(), info.OuterHTML);
            Assert.AreEqual("\r\n<div>\r\n    <span style=\"font-family: 幼圆; font-size: 1.5em;\"></span>\r\n</div>\r\n", info.InnerHTML);
        }
Beispiel #2
0
 public void TestAnalyseTemplate_空字符串情况()
 {
     TemplateAnalyser.AnalyseTemplate(string.Empty);
 }