Beispiel #1
0
        public void SetUp()
        {
            var library = new DefaultHtmlConventions().Library;

            theTemplates = new TemplateWriter(new ActiveProfile(), library, new TagRequestBuilder(new ITagRequestActivator[0]));

            theTemplates.AddTemplate("foo", new HtmlTag("span").MustacheText("foo"));
            theTemplates.AddTemplate("bar", "some {{bar}} text");

            templates = theTemplates.WriteAll();
        }
Beispiel #2
0
        public void writing_flushes_so_that_templates_do_not_get_added_twice()
        {
            theTemplates.AddTemplate("1", "hello");
            theTemplates.AddTemplate("2", "bye");

            theTemplates.WriteAll().ToString().ShouldContain("hello");

            theTemplates.AddTemplate("3", "laters");

            var result = theTemplates.WriteAll().ToString();

            result.ShouldContain("laters");
            result.ShouldNotContain("hello");
            result.ShouldNotContain("bye");
        }
        public void SetUp()
        {
            var library = new DefaultHtmlConventions().Library;

            theTemplates = new TemplateWriter(new ActiveProfile(), library, new TagRequestBuilder(new ITagRequestActivator[0]));

            theTemplates.AddTemplate("foo", new HtmlTag("span").MustacheText("foo"));
            theTemplates.AddTemplate("bar", "some {{bar}} text");

            templates = theTemplates.WriteAll();
        }
        public void SetUp()
        {
            var library = new DefaultHtmlConventions().Library;

            theTemplates = new TemplateWriter(new ActiveProfile(), library, new DefaultElementNamingConvention(),
                                              new InMemoryServiceLocator());

            theTemplates.AddTemplate("foo", new HtmlTag("span").MustacheText("foo"));
            theTemplates.AddTemplate("bar", "some {{bar}} text");

            templates = theTemplates.WriteAll();
        }