Exemplo n.º 1
0
        public void create_from_embedded_resource()
        {
            var template = FileTemplate.Embedded("view.spark");

            template.RawText.ShouldContain("<viewdata model=\"%MODEL%\" />");
            template.Extension.ShouldEqual(".spark");
        }
Exemplo n.º 2
0
        public void get_content()
        {
            var substitutions = new Substitutions();

            substitutions.Set("%MODEL%", "Foo.Bar");

            var template = FileTemplate.Embedded("view.spark");

            template.Contents(substitutions).ShouldContain("<viewdata model=\"Foo.Bar\" />");
        }
Exemplo n.º 3
0
        public void fall_all_the_way_through_to_the_embedded_resource_if_nothing_else_exists()
        {
            var template = FileTemplate.Find(theLocation, "view.spark");

            template.RawText.ShouldEqual(FileTemplate.Embedded("view.spark").RawText);
        }