public void TestAnalyse_没有输入项的普通文本()
        {
            HTMLAnalyser analyser = new HTMLAnalyser();
            List<InputItem> list = analyser.Analyse("afasldlajdgljaldjlajfljasdlfjasdf");

            Assert.AreEqual(0, list.Count);
        }
        public void TestAnalyse_分析空字符串()
        {
            HTMLAnalyser analyser = new HTMLAnalyser();
            List<InputItem> list = analyser.Analyse(string.Empty);

            Assert.AreEqual(0, list.Count);
        }
        public void TestAnalyse_没有输入项的HTML()
        {
            StreamReader reader = new StreamReader(TestContext.TestDeploymentDir + @"\HTMLs\01.htm");
            string html = reader.ReadToEnd();

            HTMLAnalyser analyser = new HTMLAnalyser();
            List<InputItem> list = analyser.Analyse(html);

            Assert.AreEqual(0, list.Count);
        }
        public void TestAnalyse_有一个Item输入项()
        {
            StreamReader reader = new StreamReader(TestContext.TestDeploymentDir + @"\HTMLs\02.htm");
            string html = reader.ReadToEnd();

            HTMLAnalyser analyser = new HTMLAnalyser();
            List<InputItem> list = analyser.Analyse(html);

            Assert.AreEqual(1, list.Count);
            Assert.AreEqual("规格介绍", list[0].DisplayName);
            Assert.AreEqual(InputType.Item, list[0].InputType);
            Assert.AreEqual(default(string), list[0].ItemValue);
            Assert.AreEqual(TOP.Common.AnalyseTool.ValueType.Image, list[0].ValueType);
            Assert.AreEqual(default(string), list[0].DefaultValue);
            Assert.AreEqual(string.Empty, list[0].InnerHTML.Trim());
        }