public void AppendSelfClosingTagSuffix_AppendsCorrectOutput() { var classBuilder = new CodeDomClassBuilder(); classBuilder.AppendSelfClosingTagSuffix(); string result = classBuilder.Build(ClassName); Assert.That(result, Is.StringContaining("base.AppendSelfClosingTagSuffix()")); }
public void AppendSelfClosingTagSuffix_XHtml4_CompilesValidTemplate() { var classBuilder = new CodeDomClassBuilder(); classBuilder.AppendSelfClosingTagSuffix(); string templateSource = classBuilder.Build(ClassName); var result = GenerateTemplateFromSource(templateSource); var writer = new StringWriter(); result.Render(writer); Assert.That(writer.ToString(), Is.EqualTo(" />")); }