public void TestDocumentRenderingSourcePropagation()
        {
            DocumentRenderer renderer = new DocumentRenderer();
            renderer.RegisterTemplate("TheOneAndOnlyTemplate", new DocumentTemplateInfo()
            {
                Value = "Hi {{!}}, {{FirstName!}}",
                SourceLocation = "The bad template",
            });

            try
            {
                var rendered = renderer.Render("[{{template TheOneAndOnlyTemplate DudeData!}}]", new { DudeData = new { FirstName = "John", LastName = "Smith" } });
                Assert.Fail("An exception should have been thrown");
            }
            catch(DocumentRenderException ex)
            {
                Assert.IsTrue(ex.Message.Contains("The bad template"));
            }
        }
 public void TestDocumentRenderingWithNamedTemplates()
 {
     DocumentRenderer renderer = new DocumentRenderer();
     renderer.RegisterTemplate("TheOneAndOnlyTemplate", new DocumentTemplateInfo()
     {
         Value = "Hi {{LastName!}}, {{FirstName!}}",
     });
     var rendered = renderer.Render("[{{template TheOneAndOnlyTemplate DudeData!}}]", new { DudeData = new { FirstName = "John", LastName = "Smith" } });
     Assert.AreEqual("[Hi Smith, John]", rendered.ToString());
 }