Esempio n. 1
0
        public void ToHTML()
        {
            ParseAndAssertNodeCount(1);
            Assert.IsTrue(node[0] is InputTag, "Node 1 should be INPUT Tag");
            InputTag inputTag = (InputTag)node[0];

            Assert.AreEqual("<INPUT TYPE=\"text\" NAME=\"Google\">", inputTag.ToHtml(), "HTML String");
        }
Esempio n. 2
0
        public void ToHTML2()
        {
            string testHTML = "<INPUT type=\"checkbox\" " + "name=\"cbCheck\" checked>";

            CreateParser(testHTML);
            parser.AddScanner(new InputTagScanner("-i"));

            ParseAndAssertNodeCount(1);
            Assert.IsTrue(node[0] is InputTag, "Node 1 should be INPUT Tag");
            InputTag inputTag = (InputTag)node[0];

            AssertHelper.FoundExpectedTagAndAttributes(inputTag.ToHtml(),
                                                       "INPUT",
                                                       "TYPE=\"checkbox\"",
                                                       "CHECKED=\"\"",
                                                       "NAME=\"cbCheck\"");
        }