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()); }
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()); }