Beispiel #1
0
        public void TestBuildingReferenceList()
        {
            string idf = "Schedule:Constant,  Test Schedule  ,,5;";

            IdfParser.IdfContext tree = idf.ParseIdf();

            ParseTreeWalker walker = new ParseTreeWalker();

            IdfLintListener idfLintListener = new IdfLintListener();

            walker.Walk(idfLintListener, tree);

            IdfLinter linter = new IdfLinter(idf);

            var result = linter.GetReferenceLists(idfLintListener.IdfObjects);

            Assert.IsTrue(result.ReferenceList.Count() == 1);

            Assert.IsTrue(result.ReferenceList["ScheduleNames"].Count() == 1);

            Assert.IsTrue(result.ReferenceList["ScheduleNames"].Contains("Test Schedule"));
        }
Beispiel #2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="IdfParser.idf"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitIdf([NotNull] IdfParser.IdfContext context)
 {
 }