Ejemplo n.º 1
0
        public void SimpleTest()
        {
            var h = new HtmlRenderer();

            h.BeginSettingsForm("TestClass");
            h.AddSegment("Test");
            h.AddMappedCheckbox("Test checkbox", "TestCheckBox", true);
            h.EndSettingsForm();

            var s = h.ToString();

            var expected = ExpectedPrefix +
                           "<h1>Test</h1>" +
                           "<div class='controls'>" +
                           "<label class='checkbox'>" +
                           "<input type='checkbox' class='mappedCheckBox' name='TestCheckBox' value='True' checked='checked' />" +
                           "Test checkbox" +
                           "</label>" +
                           "</div>" +
                           ExpectedSuffix;

            Assert.That(s, Is.EqualTo(expected));
        }
Ejemplo n.º 2
0
        public void SimpleTest()
        {
            var h = new HtmlRenderer();

            h.BeginSettingsForm("TestClass");
            h.AddSegment("Test");
            h.AddMappedCheckbox("Test checkbox", "TestCheckBox", true);
            h.EndSettingsForm();

            var s = h.ToString();

            var expected = ExpectedPrefix +
                "<h1>Test</h1>" +
                "<div class='controls'>" +
                "<label class='checkbox'>" +
                "<input type='checkbox' class='mappedCheckBox' name='TestCheckBox' value='True' checked='checked' />" +
                "Test checkbox" +
                "</label>" +
                "</div>" +
                ExpectedSuffix;

            Assert.That(s, Is.EqualTo(expected));
        }