public void Precompilation_finishes_before_returning_from_init()
 {
     foreach (var page in new[] { "v1", "v2", "v3" }.Select(name => RazorFormat.GetViewPage(name)))
     {
         Assert.That(page.IsValid);
     }
 }
 public void Pages_begin_compilation_on_startup()
 {
     foreach (var page in new[] { "v1", "v2", "v3" }.Select(name => RazorFormat.GetViewPage(name)))
     {
         Assert.That(page.MarkedForCompilation || page.IsCompiling || page.IsValid);
     }
 }
        public void Can_compile_simple_view_by_name()
        {
            const string template = "This is my sample view, Hello @Model.Name!";

            RazorFormat.VirtualFileSources.WriteFile("/Views/simple.cshtml", template);
            var addedView = RazorFormat.AddPage("/Views/simple.cshtml");
            var viewPage  = RazorFormat.GetViewPage("simple");

            Assert.That(addedView == viewPage);

            var result = RazorFormat.RenderToHtml(viewPage, new { Name = "World" });

            Assert.That(result, Is.EqualTo("This is my sample view, Hello World!"));
        }