public void It_asks_the_RenderContext_to_include_a_named_template() { var a = new TemplateInclude("a"); var template = new Template(); template.Load(new Part[] { new LiteralText("b") }); var writer = new StringWriter(); var context = new RenderContext(new Template(), null, writer, name => template, Options.Defaults()); a.Render(context); Assert.AreEqual("b", writer.GetStringBuilder().ToString()); }
public void It_has_a_useful_ToString_method() { var a = new TemplateInclude("a"); Assert.AreEqual("TemplateInclude(\"a\")", a.ToString()); }
public void Visit(TemplateInclude include) { parts.Add(context.Include(include.Name, include.Indent)); }
public void Visit(TemplateInclude include) { parts.Add(context.Include(include.Name)); }
public void It_trims_spaces() { var a = new TemplateInclude(" a "); Assert.AreEqual(a.Name, "a"); }