public static void TestFunkyEscapeSequenceInServerRender() { DustTemplate dc = new DustTemplate(@"Hello {Name}! this is another line and another", "test"); dc.Compile(); object value = new { Name = "Guy" }; string result = Dust.RenderMvcHtmlString("test", value).ToString(); OutLine(result, ConsoleColor.Yellow); }
public static void ShouldRenderDustUsingStatic() { DustTemplate dc = new DustTemplate("Hello {Name}!", "test"); dc.Compile(); object value = new { Name = "Guy" }; MvcHtmlString result = Dust.RenderMvcHtmlString("test", value); Expect.AreEqual("Hello Guy!", result.ToHtmlString()); OutLine(); OutLine(result.ToString(), ConsoleColor.Yellow); value = new { Name = "Dude" }; result = Dust.RenderMvcHtmlString("test", value); Expect.AreEqual("Hello Dude!", result.ToHtmlString()); OutLine(result.ToString(), ConsoleColor.Yellow); }