Ejemplo n.º 1
0
        public void AppendSelfClosingTagSuffix_AppendsCorrectOutput()
        {
            var classBuilder = new CodeDomClassBuilder();

            classBuilder.AppendSelfClosingTagSuffix();
            string result = classBuilder.Build(ClassName);

            Assert.That(result, Is.StringContaining("base.AppendSelfClosingTagSuffix()"));
        }
Ejemplo n.º 2
0
        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(" />"));
        }