Esempio n. 1
0
        public static void CurrentAnalysisReturnsDefaultTemplateIfParserCouldNotCreateOne()
        {
            var      buffer   = new FakeTextBuffer("<#@ t");
            var      target   = TemplateAnalyzer.GetOrCreate(buffer);
            Template template = target.CurrentAnalysis.Template;

            Assert.NotNull(template);
            Assert.Equal(0, template.ChildNodes().Count());
        }
Esempio n. 2
0
        public static void CurrentAnalysisReturnsTemplateParsedFromTextBuffer()
        {
            var      buffer   = new FakeTextBuffer("<#@ template language=\"VB\" #>");
            var      target   = TemplateAnalyzer.GetOrCreate(buffer);
            Template template = target.CurrentAnalysis.Template;

            Assert.NotNull(template);
            Assert.Equal(1, template.ChildNodes().Count());
        }