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)); }
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)); }
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)); }