示例#1
0
        public void RenderAttributeNameValuePair_VaryingNameValuePairs_GeneratesCorrectValue(string name, string value, string expectedOutput)
        {
            var    template = new DummyTemplate();
            string result   = template.RenderAttributeNameValuePair(name, value, '\"');

            Assert.That(result, Is.EqualTo(expectedOutput));
        }
示例#2
0
        public void RenderAttributeNameValuePair_BooleanAttribute_WritesCorrectAttributes(string name, string value, HtmlVersion htmlVersion, string expectedOutput)
        {
            var template = new DummyTemplate();
            template.SetHtmlVersion(htmlVersion);
            string result = template.RenderAttributeNameValuePair(name, value, '\"');

            Assert.That(result, Is.EqualTo(expectedOutput));
        }
示例#3
0
        public void RenderAttributeNameValuePair_BooleanAttribute_WritesCorrectAttributes(string name, string value, HtmlVersion htmlVersion, string expectedOutput)
        {
            var template = new DummyTemplate();

            template.SetHtmlVersion(htmlVersion);
            string result = template.RenderAttributeNameValuePair(name, value, '\"');

            Assert.That(result, Is.EqualTo(expectedOutput));
        }
示例#4
0
        public void RenderAttributeNameValuePair_VaryingQuoteTypes_RendersCorrectQuotes(char quoteToUse)
        {
            const string name = "name";
            const string value = "value";
            var template = new DummyTemplate();
            string result = template.RenderAttributeNameValuePair(name, value, quoteToUse);

            string expectedOutput = " " + name + "=" + quoteToUse + value + quoteToUse;
            Assert.That(result, Is.EqualTo(expectedOutput));
        }
示例#5
0
        public void RenderAttributeNameValuePair_VaryingQuoteTypes_RendersCorrectQuotes(char quoteToUse)
        {
            const string name     = "name";
            const string value    = "value";
            var          template = new DummyTemplate();
            string       result   = template.RenderAttributeNameValuePair(name, value, quoteToUse);

            string expectedOutput = " " + name + "=" + quoteToUse + value + quoteToUse;

            Assert.That(result, Is.EqualTo(expectedOutput));
        }
示例#6
0
 public void RenderAttributeNameValuePair_VaryingNameValuePairs_GeneratesCorrectValue(string name, string value, string expectedOutput)
 {
     var template = new DummyTemplate();
     string result = template.RenderAttributeNameValuePair(name, value, '\"');
     Assert.That(result, Is.EqualTo(expectedOutput));
 }