public void AppendSelfClosingTagSuffix_VaryingHtmlVersion_AppendsCorrectOutput(HtmlVersion htmlVersion, string expectedOutput) { var template = new DummyTemplate(); string result = template.AppendSelfClosingTagSuffix(htmlVersion); Assert.That(result, Is.EqualTo(expectedOutput)); }
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 RenderValueOrKeyAsString_RealVsFakeKey_RendersKeyOrValueCorrectly(string keyName, string expecedValue) { var dictionary = new Dictionary<string, object>(); dictionary.Add("RealKeyName", "RealValue"); var template = new DummyTemplate(); string result = template.RenderValueOrKeyAsString(dictionary, keyName); Assert.That(result, Is.StringContaining(expecedValue)); }
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)); }
public void RenderValueOrKeyAsString_RealVsFakeKey_RendersKeyOrValueCorrectly(string keyName, string expecedValue) { var dictionary = new Dictionary <string, object>(); dictionary.Add("RealKeyName", "RealValue"); var template = new DummyTemplate(); string result = template.RenderValueOrKeyAsString(dictionary, keyName); Assert.That(result, Is.StringContaining(expecedValue)); }